Skip to contentSkip to conversation

SUPPORT.md: Format as part of html docs

PATCH Superseded Ian Jackson 3 participants 13 messages Apr 10, 2018 – Apr 11, 2018 1 message not in the archive

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover SUPPORT.md: Format as part of html docs

The SUPPORT.md document (introduced in 4.10) does not appear here
http://xenbits.xen.org/docs/
In this series I fix this.

This is a prerequisite for my work to generate a matrix representing the cross-version feature support status, because that cross-version matrix wants to contain hyperlinks into the appropriate bits of (html) SUPPORT.md.

This series should be backported to 4.10. If and when a SUPPORT.md is provided for earlier releases, it should be backported to those too.

There are three patches fixing minor syntax trouble in SUPPORT.md, and four build system changes. I hope the release ack will be a formality :-).

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw

PATCH 1/7 SUPPORT.md: Syntax: Fix some bullet lists

Continuations of bullet list items must be indented by exactly 4 spaces (according to pandoc_markdown(5) on Debian jessie).

This is most easily achieved by making the bullet list items have two spaces before the `*'.

---
 SUPPORT.md | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)
SUPPORT.md +18 -18
index c72a25b..1c5220b 100644
@@ -783,40 +783,40 @@ What is the risk of it exhibiting bugs?
 
 General answers to the above:
 
- * **Here be dragons**
+  * **Here be dragons**
 
-   Pretty likely to still crash / fail to work.
-   Not recommended unless you like life on the bleeding edge.
+    Pretty likely to still crash / fail to work.
+    Not recommended unless you like life on the bleeding edge.
 
- * **Quirky**
+  * **Quirky**
 
-   Mostly works but may have odd behavior here and there.
-   Recommended for playing around or for non-production use cases.
+    Mostly works but may have odd behavior here and there.
+    Recommended for playing around or for non-production use cases.
 
- * **Normal**
+  * **Normal**
 
-   Ready for production use
+    Ready for production use
 
 ### Interface stability
 
 If I build a system based on the current interfaces,
 will they still work when I upgrade to the next version?
 
- * **Not stable**
+  * **Not stable**
 
-   Interface is still in the early stages and
-   still fairly likely to be broken in future updates.
+    Interface is still in the early stages and
+    still fairly likely to be broken in future updates.
 
- * **Provisionally stable**
+  * **Provisionally stable**
 
-   We're not yet promising backwards compatibility,
-   but we think this is probably the final form of the interface.
-   It may still require some tweaks.
+    We're not yet promising backwards compatibility,
+    but we think this is probably the final form of the interface.
+    It may still require some tweaks.
 
- * **Stable**
+  * **Stable**
 
-   We will try very hard to avoid breaking backwards  compatibility,
-   and to fix any regressions that are reported.
+    We will try very hard to avoid breaking backwards  compatibility,
+    and to fix any regressions that are reported.
 
 ### Security supported
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/7
#2 lore raw

Re: [PATCH 1/7] SUPPORT.md: Syntax: Fix some bullet lists

Quoted 7 lines · Ian Jackson

Continuations of bullet list items must be indented by exactly 4 spaces (according to pandoc_markdown(5) on Debian jessie).

This is most easily achieved by making the bullet list items have two spaces before the `*'.

You forgot to CC "THE REST".

Quoted 71 lines
---
 SUPPORT.md | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)
SUPPORT.md +18 -19
index c72a25b..1c5220b 100644
@@ -783,40 +783,40 @@ What is the risk of it exhibiting bugs?
 
 General answers to the above:
 
- * **Here be dragons**
+  * **Here be dragons**
 
-   Pretty likely to still crash / fail to work.
-   Not recommended unless you like life on the bleeding edge.
+    Pretty likely to still crash / fail to work.
+    Not recommended unless you like life on the bleeding edge.
 
- * **Quirky**
+  * **Quirky**
 
-   Mostly works but may have odd behavior here and there.
-   Recommended for playing around or for non-production use cases.
+    Mostly works but may have odd behavior here and there.
+    Recommended for playing around or for non-production use cases.
 
- * **Normal**
+  * **Normal**
 
-   Ready for production use
+    Ready for production use
 
 ### Interface stability
 
 If I build a system based on the current interfaces,
 will they still work when I upgrade to the next version?
 
- * **Not stable**
+  * **Not stable**
 
-   Interface is still in the early stages and
-   still fairly likely to be broken in future updates.
+    Interface is still in the early stages and
+    still fairly likely to be broken in future updates.
 
- * **Provisionally stable**
+  * **Provisionally stable**
 
-   We're not yet promising backwards compatibility,
-   but we think this is probably the final form of the interface.
-   It may still require some tweaks.
+    We're not yet promising backwards compatibility,
+    but we think this is probably the final form of the interface.
+    It may still require some tweaks.
 
- * **Stable**
+  * **Stable**
 
-   We will try very hard to avoid breaking backwards  compatibility,
-   and to fix any regressions that are reported.
+    We will try very hard to avoid breaking backwards  compatibility,
+    and to fix any regressions that are reported.
 
 ### Security supported
 
--

2.1.4

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw

PATCH 2/7 SUPPORT.md: Syntax: Fix a typo "States"

In reply to Ian Jackson
---
 SUPPORT.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
SUPPORT.md +1 -1
index 1c5220b..e447069 100644
@@ -360,7 +360,7 @@ Guest-side driver capable of speaking the Xen PV block protocol
     Status, FreeBSD: Supported, Security support external
     Status, NetBSD: Supported, Security support external
     Status, OpenBSD: Supported, Security support external
-    States, Windows: Supported
+    Status, Windows: Supported
 
 Guest-side driver capable of speaking the Xen PV networking protocol
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 2/7
#4 lore raw

Re: [PATCH 2/7] SUPPORT.md: Syntax: Fix a typo "States"

Quoted 1 line · Ian Jackson
Quoted 21 lines
---
 SUPPORT.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
SUPPORT.md +1 -2
index 1c5220b..e447069 100644
@@ -360,7 +360,7 @@ Guest-side driver capable of speaking the Xen PV block protocol
     Status, FreeBSD: Supported, Security support external
     Status, NetBSD: Supported, Security support external
     Status, OpenBSD: Supported, Security support external
-    States, Windows: Supported
+    Status, Windows: Supported
 
 Guest-side driver capable of speaking the Xen PV networking protocol
 
--

2.1.4

Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw

PATCH 3/7 SUPPORT.md: Syntax: Provide a title rather than a spurious empty section

In reply to Ian Jackson
---
 SUPPORT.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
SUPPORT.md +1 -1
index e447069..264b23f 100644
@@ -1,4 +1,4 @@
-# Support statement for this release
+% Support statement for this release
 
 This document describes the support status
 and in particular the security support status of the Xen branch
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#6 lore raw

Re: [PATCH 3/7] SUPPORT.md: Syntax: Provide a title rather than a spurious empty section

SUPPORT.md line 1

Quoted 12 lines · Ian Jackson
---
 SUPPORT.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
SUPPORT.md +1 -1
index e447069..264b23f 100644
@@ -1,4 +1,4 @@
-# Support statement for this release
+% Support statement for this release

By doing this we're more or less committing to pandoc's dialect of Markdown, yes?

-George

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Re: [PATCH 3/7] SUPPORT.md: Syntax: Provide a title rather than a spurious empty section

Quoted 11 lines · Ian Jackson

George Dunlap writes ("Re: [Xen-devel] [PATCH 3/7] SUPPORT.md: Syntax: Provide a title rather than a spurious empty section"):

Quoted 6 lines · Ian Jackson
Quoted 2 lines

-# Support statement for this release
+% Support statement for this release

By doing this we're more or less committing to pandoc's dialect of Markdown, yes?

I think so, yes. There doesn't seem to be a way to define the document title in a way that's the same across markdown processors.

Quoted 7 lines

markdown(1) just spits the `%' out as a literal (and indeed it doesn't generate a <head> element at all).

I should perhaps have mentioned this issue in the commit message.

We already have a lot of .pandoc files in docs/. Do you think this is bad for SUPPORT.md ?

Well I've been poking around a bit, and now I'm persuaded that pandoc markdown is a reasonable dialect to commit to. :-) As you say, we want to have a title and there doesn't seem to be a way to do that which is common across markdown dialects.

-George

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#9 lore raw

PATCH 4/7 docs/gen-html-index: Extract titles from HTML documents

In reply to Ian Jackson
---
 docs/gen-html-index | 13 +++++++++++++
 1 file changed, 13 insertions(+)
docs/gen-html-index +13 -0
index e9792bf..5b43b42 100644
@@ -10,6 +10,7 @@ use warnings;
 use Getopt::Long;
 use IO::File;
 use File::Basename;
+use HTML::TreeBuilder::XPath;
 
 Getopt::Long::Configure('bundling');
 
@@ -64,6 +65,18 @@ sub make_linktext ($) {
     return "$1($2)" if $l =~ m,^man/(.*)\.([0-9].*)\.html,;
     $l =~ s/.(?:html|txt)$//g;
     return $index{$l} if exists $index{$l};
+
+    my $from_html;
+    eval {
+        my $tree = new HTML::TreeBuilder::XPath;
+        my $f = "$outdir/$l.html";
+        open F, '<', $f or die "$l $f $!";
+        $tree->parse_file(\*F) or die;
+        close F;
+        $from_html = $tree->findvalue("/html/head/title");
+    };
+    return $from_html if $from_html;
+
     return basename($l);
 }
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#10 lore raw

PATCH 5/7 docs/gen-html-index: Support documents at the toplevel

In reply to Ian Jackson

There are none yet.

---
 docs/gen-html-index | 4 ++++
 1 file changed, 4 insertions(+)
docs/gen-html-index +4 -0
index 5b43b42..8258e2b 100644
@@ -137,6 +137,10 @@ sub dirs($)
     return @dirs;
 }
 
+foreach my $of (grep { !m{/} } @docs) {
+    $top .= make_link($of,'');
+}
+
 foreach my $od (sort { $a cmp $b } uniq map { dirs($_) } @docs) {
     my @d = (grep /^\Q$od\E/, @docs);
     if ( @d == 1 and $d[0] eq "$od/index.html" )
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#11 lore raw

PATCH 6/7 docs/Makefile: Introduce GENERATE_PANDOC_RULE_RAW

In reply to Ian Jackson

We are going to want to format SUPPORT.md which does not match the filename patterns in docs/. So provide a way to make an ad-hoc rule using pandoc with the standard options.

No functional change in this patch.

---
 docs/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
docs/Makefile +6 -5
index 6743fa3..d82463f 100644
@@ -237,17 +237,18 @@ txt/%.txt: %.markdown
 	$(INSTALL_DATA) $< $@
 
 # Metarule for generating pandoc rules.
-define GENERATE_PANDOC_RULE
-# $(1) is the target documentation format. $(2) is the source format.
-
-$(1)/%.$(1): %.$(2)
+define GENERATE_PANDOC_RULE_RAW
+$(1): $(2)
 ifneq ($(PANDOC),)
 	@$(INSTALL_DIR) $$(@D)
 	$(PANDOC) --number-sections --toc --standalone $$< --output $$@
 else
 	@echo "pandoc not installed; skipping $$@"
 endif
-
+endef
+define GENERATE_PANDOC_RULE
+# $(1) is the target documentation format. $(2) is the source format.
+$(call GENERATE_PANDOC_RULE_RAW,$(1)/%.$(1),%.$(2))
 endef
 $(eval $(call GENERATE_PANDOC_RULE,pdf,pandoc))   # pdf/%.pdf: %.pandoc
 $(eval $(call GENERATE_PANDOC_RULE,txt,pandoc))   # txt/%.txt: %.pandoc
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#12 lore raw

PATCH 7/7 docs/Makefile: Format SUPPORT.md into the toplevel

In reply to Ian Jackson
---
 docs/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
docs/Makefile +4 -1
index d82463f..b300bb6 100644
@@ -28,7 +28,8 @@ DOC_MAN7 := $(patsubst man/%.pod.7,man7/%.7,$(MAN7SRC-y)) \
 	        $(patsubst man/%.markdown.7,man7/%.7,$(MAN7SRC-y))
 DOC_MAN8 := $(patsubst man/%.pod.8,man8/%.8,$(MAN8SRC-y)) \
 	        $(patsubst man/%.markdown.8,man8/%.8,$(MAN8SRC-y))
-DOC_HTML := $(patsubst %.markdown,html/%.html,$(MARKDOWNSRC-y)) \
+DOC_HTML := html/SUPPORT.html \
+            $(patsubst %.markdown,html/%.html,$(MARKDOWNSRC-y)) \
             $(patsubst %.pandoc,html/%.html,$(PANDOCSRC-y)) \
             $(patsubst man/%.markdown.1,html/man/%.1.html,$(MAN1SRC-y)) \
             $(patsubst man/%.markdown.5,html/man/%.5.html,$(MAN5SRC-y)) \
@@ -255,6 +256,8 @@ $(eval $(call GENERATE_PANDOC_RULE,txt,pandoc))   # txt/%.txt: %.pandoc
 $(eval $(call GENERATE_PANDOC_RULE,html,pandoc))  # html/%.html: %.pandoc
 $(eval $(call GENERATE_PANDOC_RULE,pdf,markdown)) # pdf/%.pdf: %.markdown
 
+$(eval $(call GENERATE_PANDOC_RULE_RAW,html/SUPPORT.html,$(XEN_ROOT)/SUPPORT.md)) # pdf/%.pdf: %.markdown
+
 ifeq (,$(findstring clean,$(MAKECMDGOALS)))
 $(XEN_ROOT)/config/Docs.mk:
 	$(error You have to run ./configure before building docs)
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#13 lore raw
In reply to Ian Jackson
Quoted 9 lines · Ian Jackson

The SUPPORT.md document (introduced in 4.10) does not appear here
http://xenbits.xen.org/docs/
In this series I fix this.

This is a prerequisite for my work to generate a matrix representing the cross-version feature support status, because that cross-version matrix wants to contain hyperlinks into the appropriate bits of (html) SUPPORT.md.

Quoted 9 lines

This series should be backported to 4.10. If and when a SUPPORT.md is provided for earlier releases, it should be backported to those too.

There are three patches fixing minor syntax trouble in SUPPORT.md, and four build system changes. I hope the release ack will be a formality :-).

Ian.

For the series:

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel