All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Markus Heiser <markus.heiser@darmarit.de>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, Jani Nikula <jani.nikula@intel.com>
Subject: Re: [PATCH 00/18] Complete moving media documentation to ReST format
Date: Tue, 19 Jul 2016 11:53:19 -0300	[thread overview]
Message-ID: <20160719115319.316349a7@recife.lan> (raw)
In-Reply-To: <6702C6D4-929F-420D-9CF9-911CA753B0A7@darmarit.de>

Em Tue, 19 Jul 2016 14:31:18 +0200
Markus Heiser <markus.heiser@darmarit.de> escreveu:


> > I really hate stupid toolchains that require everybody to upgrade to
> > the very latest version of it every time.  
> 
> Hi Mauro,
> 
> It might be annoying how sphinx handles errors, but normally a build
> process should report errors to monitor.

The documents are automatically built at linuxtv.org once a day. While
Sphinx doesn't build them without warnings, I won't enable any sort
of feedback from the server, as I don't want to be bothered all
days about the same warnings.

Also, for safety reasons, we only install packages on the server
that are shipped with the distribution.

> > Maybe someone at linux-doc 
> > may have an idea about how to add new markup attributes to the 
> > documents without breaking for the ones using older versions of Sphinx.  
> 
> see below
> 
> > The problem we're facing is due to a change meant to add a title before
> > each media's table of contents (provided via :toctree:  markup).  
> 
> I think this is only ONE drawback, others see the changelog  ..

I had to remove captions from tables on a past patch, because of the
same reason: Sphinx 1.2.x doesn't support it.

> * http://www.sphinx-doc.org/en/stable/changes.html

What we miss is the documentation for Sphinx 1.2 and 1.3 versions. The
site only has documentation for the very latest version, making harder
to ensure that we're using only the tags supported by a certain version.

> > All it needs is something that will be translated to HTML as:
> > <h1>Table of contents</h1>, without the need of creating any cross
> > reference, nor being added to the main TOC at Documentation/index.rst.
> > 
> > We can't simply use the normal way to generate <h1> tags:
> > 
> > --- a/Documentation/media/dvb-drivers/index.rst
> > +++ b/Documentation/media/dvb-drivers/index.rst
> > @@ -15,6 +15,10 @@ the license is included in the chapter entitled "GNU Free Documentation
> > License".
> > 
> > 
> > +#####################
> > +FOO Table of contents
> > +#####################
> > +
> > .. toctree::
> > 	:maxdepth: 5
> > 	:numbered:
> > 
> > The page itself would look OK, but this would produce a new entry at the
> > output/html/index.html:
> > 
> > 	* Linux Digital TV driver-specific documentation
> > 	* FOO Table of contents
> > 
> > 	    1. Introdution
> > 
> > With is not what we want.
> > 
> > With Sphinx 1.4.5, the way of doing that is to add a :caption: tag
> > to the toctree, but this tag doesn't exist on 1.2.x. Also, as it
> > also convert captions on references, and all books are linked
> > together at Documentation/index.rst, it also needs a :name: tag,
> > in order to avoid warnings about duplicated tags when building the
> > main index.rst.
> > 
> > I have no idea about how to do that in a backward-compatible way.
> > 
> > Maybe Markus, Jani or someone else at linux-doc may have some
> > glue.  
> 
> IMHO: A backward-compatible way for all linux distros and versions
> out there is not the way.
> 
> If we use options or features of a new version, we have to
> install the new version (independent which xml we used in the past
> or python tool we want to use).

With DocBook this is clear: the document itself is bound against
an specific version of the spec. So, *all* versions of the DocBook
toolchains support the very same document, or, when it doesn't, the
toolchain aborts with an error and doesn't produce anything. Very
easy for a script to identify if the build succeeds or not.

Sphinx is very evil with that regards: it keeps generating the
files, except that the contents of the tags that contain unrecognized
fields will be empty (with is very bad for :toctree:) and a few
additional warnings will be generated. Very hard for a script to detect
if the doc was OK or got mangled by the toolchain, because of a version
incompatibility.

> IMHO the main problem is, that we have not yet documented on which
> Sphinx version we agree and how to get a build environment which
> fullfills these requirements.

Yes, the Sphinx minimal version should be documented at
Documentation/Changes.

I'd say that the minimal version should be the Sphinx version
found on the latest version of the main distributions, e .g.
at least Fedora, openSuse, Debian, Ubuntu.
(I guess distros like ArchLinux and Gentoo won't be a problem,
as they tend to use the newer versions of the sources).

On a quick check:

- Fedora 24 comes with 1.3.x
- openSuse 13.2 with 1.2.x
- Debian 8.5 with 1.2.x.
- Ubuntu 16.04 with 1.3.x
- Ubuntu 14.04 with 1.2.x
- Mageia 5 with 1.2.x

So, I guess we should set the minimal requirement to 1.2.x.

Btw, usually, on Kernel, we're very conservative to increment the 
minimal version of a toolchain. So, for example, while GCC current
version is 6.1, the minimal requirement is gcc 3.2 (with was released
in 2003).

> For build environments I recommend to set up a python virtualenv
> 
> * https://virtualenv.pypa.io/en/stable/

We can't assume that every Kernel developer would install a
python virtualenv. Instead, they'll just use whatever Sphinx
version is provided on their development machines.

> Additional:
> 
> At this time, the make file only checks if sphinx is installed.
> With a small addition to the make file, we could check if all
> requirements are fulfilled. 
> 
> If you are interested in how, I could send a patch.

It is better to have an error than to build the documentation with
errors. Yet, as I said, this doesn't fix the issue, as anyone
can insert a tag that won't be recognized by the official
minimal version. Not sure how to address this.

Yet, this doesn't solve the specific issue for the TOC index
name. How this could be done in a way that would be backward
compatible to 1.2.x?

Thanks,
Mauro

  reply	other threads:[~2016-07-19 14:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 18:30 [PATCH 00/18] Complete moving media documentation to ReST format Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 01/18] [media] doc-rst: move bttv documentation to bttv.rst file Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 02/18] [media] doc-rst: add documentation for bttv driver Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 03/18] [media] doc-rst: add documentation for tuners Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 04/18] [media] doc-rst: start adding documentation for cx2341x Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 05/18] [media] cx2341x.rst: add fw-decoder-registers.txt content Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 06/18] [media] cx2341x.rst: Add the contents of fw-encoder-api.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 07/18] [media] cx2341x.rst: add the contents of fw-calling.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 08/18] [media] cx2341x.rst: add contents of fw-dma.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 09/18] [media] cx2341x.rst: add contents of fw-memory.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 10/18] [media] cx2341x.rst: add the contents of fw-upload.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 11/18] [media] cx2341x.rst: add contents of fw-osd-api.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 12/18] [media] cx2341x: add contents of README.hm12 Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 13/18] [media] cx2341x.rst: add contents of README.vbi Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 14/18] [media] cx88.rst: add contents from not-in-cx2388x-datasheet.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 15/18] [media] cx88.rst: add contents of hauppauge-wintv-cx88-ir.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 16/18] [media] get rid of Documentation/video4linux/lifeview.txt Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 17/18] [media] doc-rst: fix media kAPI documentation Mauro Carvalho Chehab
2016-07-18 18:30 ` [PATCH 18/18] [media] doc-rst: better name the media books Mauro Carvalho Chehab
2016-07-19  9:19 ` [PATCH 00/18] Complete moving media documentation to ReST format Hans Verkuil
2016-07-19 11:12   ` Mauro Carvalho Chehab
2016-07-19 12:31     ` Markus Heiser
2016-07-19 14:53       ` Mauro Carvalho Chehab [this message]
2016-07-19 15:40         ` Mauro Carvalho Chehab
2016-07-19 16:42         ` Markus Heiser
2016-07-19 17:18           ` Mauro Carvalho Chehab
2016-07-21 15:17             ` Markus Heiser
2016-07-22  9:46               ` Mauro Carvalho Chehab
2016-07-22 10:55                 ` Markus Heiser
2016-07-19 22:49         ` Jonathan Corbet
2016-07-20  0:00           ` Mauro Carvalho Chehab
2016-07-20  6:07             ` Markus Heiser
2016-07-20 10:19               ` Mauro Carvalho Chehab
2016-07-20 23:28               ` Jonathan Corbet
2016-07-21 14:41                 ` Markus Heiser
2016-07-21 16:59                   ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160719115319.316349a7@recife.lan \
    --to=mchehab@s-opensource.com \
    --cc=corbet@lwn.net \
    --cc=hverkuil@xs4all.nl \
    --cc=jani.nikula@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=markus.heiser@darmarit.de \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.