All of lore.kernel.org
 help / color / mirror / Atom feed
* make pdfdocs fails on Debian stable
@ 2022-01-03 16:30 Christoph Hellwig
  2022-01-03 16:58 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-03 16:30 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab; +Cc: linux-doc, linux-kernel

Hi Jon and Mauro,

when trying to do a make pdfdocs on my Debian stable system I can't
get it to complete.  The output below is from linux-next, but mainline
is the same.

------------
Running 'xelatex --no-pdf -interaction=batchmode -no-pdf -recorder  "RCU.tex"'
------------
This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020/Debian) (preloaded format=xelatex)
restricted \write18 enabled.
 entering extended mode
Latexmk: Examining 'RCU.log'
=== TeX engine is 'XeTeX'
Latexmk: Index file 'RCU.idx' was written
Latexmk: References changed.
Latexmk: Log file says output to 'RCU.xdv'
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  xelatex: Command for 'xelatex' gave return code 1
    Refer to 'RCU.log' for details
Latexmk: Use the -f option to force complete processing,
  unless error was exceeding maximum runs, or warnings treated as errors.
make[2]: *** [Makefile:29: RCU.pdf] Error 12
make[1]: *** [Documentation/Makefile:115: pdfdocs] Error 2
make: *** [Makefile:1772: pdfdocs] Error 2


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-03 16:30 make pdfdocs fails on Debian stable Christoph Hellwig
@ 2022-01-03 16:58 ` Mauro Carvalho Chehab
  2022-01-03 17:11   ` Christoph Hellwig
  0 siblings, 1 reply; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-03 16:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jonathan Corbet, linux-doc, linux-kernel

Em Mon, 3 Jan 2022 17:30:50 +0100
Christoph Hellwig <hch@lst.de> escreveu:

> Hi Jon and Mauro,
> 
> when trying to do a make pdfdocs on my Debian stable system I can't
> get it to complete.  The output below is from linux-next, but mainline
> is the same.
> 
> ------------
> Running 'xelatex --no-pdf -interaction=batchmode -no-pdf -recorder  "RCU.tex"'
> ------------
> This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020/Debian) (preloaded format=xelatex)
> restricted \write18 enabled.
>  entering extended mode
> Latexmk: Examining 'RCU.log'
> === TeX engine is 'XeTeX'
> Latexmk: Index file 'RCU.idx' was written
> Latexmk: References changed.
> Latexmk: Log file says output to 'RCU.xdv'
> Latexmk: Errors, so I did not complete making targets
> Collected error summary (may duplicate other messages):
>   xelatex: Command for 'xelatex' gave return code 1
>     Refer to 'RCU.log' for details
> Latexmk: Use the -f option to force complete processing,
>   unless error was exceeding maximum runs, or warnings treated as errors.
> make[2]: *** [Makefile:29: RCU.pdf] Error 12
> make[1]: *** [Documentation/Makefile:115: pdfdocs] Error 2
> make: *** [Makefile:1772: pdfdocs] Error 2
> 

Weird... when you do a make, it should have checked for all
dependencies, when it internally runs:

	./scripts/sphinx-pre-install 

Basically, you need the xelatex package for it to work, as PDF
output is via LaTeX. This is not a mandatory requirement, though,
as most people are only interested on html output, and LaTeX
dependencies require to install lots of stuff. it should provide you
a list of packages required for PDF, with a suggestion of using
apt-get to install it.

In this specific case, I guess the package name is 'texlive-xetex'.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-03 16:58 ` Mauro Carvalho Chehab
@ 2022-01-03 17:11   ` Christoph Hellwig
  2022-01-03 20:58     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-03 17:11 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Christoph Hellwig, Jonathan Corbet, linux-doc, linux-kernel

On Mon, Jan 03, 2022 at 05:58:14PM +0100, Mauro Carvalho Chehab wrote:
> Weird... when you do a make, it should have checked for all
> dependencies, when it internally runs:
> 
> 	./scripts/sphinx-pre-install 

Detected OS: Debian GNU/Linux 11 (bullseye).
Sphinx version: 3.4.3


All optional dependencies are met.
Needed package dependencies are met.

> Basically, you need the xelatex package for it to work, as PDF
> output is via LaTeX. This is not a mandatory requirement, though,
> as most people are only interested on html output, and LaTeX
> dependencies require to install lots of stuff. it should provide you
> a list of packages required for PDF, with a suggestion of using
> apt-get to install it.
> 
> In this specific case, I guess the package name is 'texlive-xetex'.

texlive-xetex is installed and seems to work find on various other
documents produced earlier by make pdfdocs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-03 17:11   ` Christoph Hellwig
@ 2022-01-03 20:58     ` Mauro Carvalho Chehab
  2022-01-03 21:01       ` [PATCH 0/1] Detect the need of texlive-ctex Mauro Carvalho Chehab
  2022-01-04  6:47       ` make pdfdocs fails on Debian stable Christoph Hellwig
  0 siblings, 2 replies; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-03 20:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jonathan Corbet, linux-doc, linux-kernel

Em Mon, 3 Jan 2022 18:11:08 +0100
Christoph Hellwig <hch@lst.de> escreveu:

> On Mon, Jan 03, 2022 at 05:58:14PM +0100, Mauro Carvalho Chehab wrote:
> > Weird... when you do a make, it should have checked for all
> > dependencies, when it internally runs:
> > 
> > 	./scripts/sphinx-pre-install   
> 
> Detected OS: Debian GNU/Linux 11 (bullseye).
> Sphinx version: 3.4.3
> 
> 
> All optional dependencies are met.
> Needed package dependencies are met.
> 
> > Basically, you need the xelatex package for it to work, as PDF
> > output is via LaTeX. This is not a mandatory requirement, though,
> > as most people are only interested on html output, and LaTeX
> > dependencies require to install lots of stuff. it should provide you
> > a list of packages required for PDF, with a suggestion of using
> > apt-get to install it.
> > 
> > In this specific case, I guess the package name is 'texlive-xetex'.  
> 
> texlive-xetex is installed and seems to work find on various other
> documents produced earlier by make pdfdocs

Ah, the error is specific to RCU.tex then?

You'll need to re-run xelatex with -interaction=interactive, in
order to be able to identify what's the root cause.

You could do this by using LATEXOPTS, e. g.:

	$ make SPHINXDIRS=RCU LATEXOPTS="-interaction=interactive" pdfdocs

With that, LaTeX will stop at the offending line from the .tex file.

On a quick test here, I'm getting these at Fedora 35:

	(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty)

	! LaTeX Error: File `ctexhook.sty' not found.

	Type X to quit or <RETURN> to proceed,
	or enter new name. (Default extension: sty)

It seems that a recent change (probably to better address issues with 
Chinese and Japanese translation) added an extra dependency to some
stylesheet.

I solved it by installing this package: "texlive-ctex".

The enclosed patch should fix the script for it to report such need.

Thanks,
Mauro

[PATCH] scripts: sphinx-pre-install: add required ctex dependency

After a change meant to fix support for oriental characters
(Chinese, Japanese, Korean), ctex stylesheet is now a requirement
for PDF output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 288e86a9d1e5..46aaab414098 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -78,6 +78,7 @@ my %texlive = (
 	'ucs.sty'            => 'texlive-ucs',
 	'upquote.sty'        => 'texlive-upquote',
 	'wrapfig.sty'        => 'texlive-wrapfig',
+	'ctexhook.sty'       => 'texlive-ctex',
 );
 
 #


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 0/1] Detect the need of texlive-ctex
  2022-01-03 20:58     ` Mauro Carvalho Chehab
@ 2022-01-03 21:01       ` Mauro Carvalho Chehab
  2022-01-03 21:01         ` [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency Mauro Carvalho Chehab
  2022-01-04  6:47       ` make pdfdocs fails on Debian stable Christoph Hellwig
  1 sibling, 1 reply; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-03 21:01 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, linux-kernel, Jonathan Corbet, Christoph Hellwig

Hi Jon,

Based on Christoph's report, it seems we need to add an extra dependency
for PDF builds.

Mauro Carvalho Chehab (1):
  scripts: sphinx-pre-install: add required ctex dependency

 scripts/sphinx-pre-install | 1 +
 1 file changed, 1 insertion(+)

-- 
2.33.1



^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-03 21:01       ` [PATCH 0/1] Detect the need of texlive-ctex Mauro Carvalho Chehab
@ 2022-01-03 21:01         ` Mauro Carvalho Chehab
  2022-01-03 22:46           ` Jonathan Corbet
  0 siblings, 1 reply; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-03 21:01 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, linux-kernel, Christoph Hellwig

After a change meant to fix support for oriental characters
(Chinese, Japanese, Korean), ctex stylesheet is now a requirement
for PDF output.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/

 scripts/sphinx-pre-install | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 288e86a9d1e5..46aaab414098 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -78,6 +78,7 @@ my %texlive = (
 	'ucs.sty'            => 'texlive-ucs',
 	'upquote.sty'        => 'texlive-upquote',
 	'wrapfig.sty'        => 'texlive-wrapfig',
+	'ctexhook.sty'       => 'texlive-ctex',
 );
 
 #
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-03 21:01         ` [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency Mauro Carvalho Chehab
@ 2022-01-03 22:46           ` Jonathan Corbet
  2022-01-04  0:04             ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Jonathan Corbet @ 2022-01-03 22:46 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, linux-kernel, Christoph Hellwig

Mauro Carvalho Chehab <mchehab@kernel.org> writes:

> After a change meant to fix support for oriental characters
> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
> for PDF output.
>
> Reported-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
>
> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
>
>  scripts/sphinx-pre-install | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index 288e86a9d1e5..46aaab414098 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -78,6 +78,7 @@ my %texlive = (
>  	'ucs.sty'            => 'texlive-ucs',
>  	'upquote.sty'        => 'texlive-upquote',
>  	'wrapfig.sty'        => 'texlive-wrapfig',
> +	'ctexhook.sty'       => 'texlive-ctex',
>  );

I've applied this, thanks.

jon

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-03 22:46           ` Jonathan Corbet
@ 2022-01-04  0:04             ` Akira Yokosawa
  2022-01-04  1:54               ` Akira Yokosawa
  2022-01-04  2:00               ` Akira Yokosawa
  0 siblings, 2 replies; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  0:04 UTC (permalink / raw)
  To: corbet, mchehab; +Cc: hch, linux-doc, linux-kernel

Hi,

On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:
> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
> 
>> After a change meant to fix support for oriental characters
>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
>> for PDF output.

FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
in June 2021.

        Thanks, Akira

>>
>> Reported-by: Christoph Hellwig <hch@lst.de>
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
>> ---
>>
>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
>>
>>  scripts/sphinx-pre-install | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
>> index 288e86a9d1e5..46aaab414098 100755
>> --- a/scripts/sphinx-pre-install
>> +++ b/scripts/sphinx-pre-install
>> @@ -78,6 +78,7 @@ my %texlive = (
>>  	'ucs.sty'            => 'texlive-ucs',
>>  	'upquote.sty'        => 'texlive-upquote',
>>  	'wrapfig.sty'        => 'texlive-wrapfig',
>> +	'ctexhook.sty'       => 'texlive-ctex',
>>  );
> 
> I've applied this, thanks.> 
> jon



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-04  0:04             ` Akira Yokosawa
@ 2022-01-04  1:54               ` Akira Yokosawa
  2022-01-04  8:05                 ` Mauro Carvalho Chehab
  2022-01-04  2:00               ` Akira Yokosawa
  1 sibling, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  1:54 UTC (permalink / raw)
  To: mchehab; +Cc: hch, linux-doc, linux-kernel, corbet

Hi Mauro, see inline comments below.

On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:
> Hi,
> 
> On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:
>> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
>>
>>> After a change meant to fix support for oriental characters
>>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
>>> for PDF output.
> 
> FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
> in June 2021.
> 
>         Thanks, Akira
> 
>>>
>>> Reported-by: Christoph Hellwig <hch@lst.de>
>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
>>> ---
>>>
>>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
>>>
>>>  scripts/sphinx-pre-install | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
>>> index 288e86a9d1e5..46aaab414098 100755
>>> --- a/scripts/sphinx-pre-install
>>> +++ b/scripts/sphinx-pre-install
>>> @@ -78,6 +78,7 @@ my %texlive = (
>>>  	'ucs.sty'            => 'texlive-ucs',
>>>  	'upquote.sty'        => 'texlive-upquote',
>>>  	'wrapfig.sty'        => 'texlive-wrapfig',
>>> +	'ctexhook.sty'       => 'texlive-ctex',
>>>  );
>>

I'm afraid this update of the list for Fedora/openSUSE won't help
Debian Stable (bullseye) users.

ctexhook.sty is in texlive-lang-chinese on Debian/Ubuntu.

        Thanks, Akria


>> I've applied this, thanks.> 
>> jon
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-04  0:04             ` Akira Yokosawa
  2022-01-04  1:54               ` Akira Yokosawa
@ 2022-01-04  2:00               ` Akira Yokosawa
  1 sibling, 0 replies; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  2:00 UTC (permalink / raw)
  To: corbet, mchehab; +Cc: hch, linux-doc, linux-kernel

On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:
> Hi,
> 
> On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:
>> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
>>
>>> After a change meant to fix support for oriental characters
>>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
>>> for PDF output.
> 
> FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
> in June 2021.

This is not the case.  ctexhook.sty is required since xeCJK.sty v3.8.3
released in May 2020.

Sorry for the noise.

        Thanks, Akira

> 
>         Thanks, Akira
> 
>>>
>>> Reported-by: Christoph Hellwig <hch@lst.de>
>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
>>> ---
>>>
>>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
>>>
>>>  scripts/sphinx-pre-install | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
>>> index 288e86a9d1e5..46aaab414098 100755
>>> --- a/scripts/sphinx-pre-install
>>> +++ b/scripts/sphinx-pre-install
>>> @@ -78,6 +78,7 @@ my %texlive = (
>>>  	'ucs.sty'            => 'texlive-ucs',
>>>  	'upquote.sty'        => 'texlive-upquote',
>>>  	'wrapfig.sty'        => 'texlive-wrapfig',
>>> +	'ctexhook.sty'       => 'texlive-ctex',
>>>  );
>>
>> I've applied this, thanks.> 
>> jon
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-03 20:58     ` Mauro Carvalho Chehab
  2022-01-03 21:01       ` [PATCH 0/1] Detect the need of texlive-ctex Mauro Carvalho Chehab
@ 2022-01-04  6:47       ` Christoph Hellwig
  2022-01-04  7:32         ` Akira Yokosawa
  1 sibling, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-04  6:47 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Christoph Hellwig, Jonathan Corbet, linux-doc, linux-kernel

On Mon, Jan 03, 2022 at 09:58:31PM +0100, Mauro Carvalho Chehab wrote:
> Ah, the error is specific to RCU.tex then?

Yes.

> 
> You'll need to re-run xelatex with -interaction=interactive, in
> order to be able to identify what's the root cause.
> 
> You could do this by using LATEXOPTS, e. g.:
> 
> 	$ make SPHINXDIRS=RCU LATEXOPTS="-interaction=interactive" pdfdocs
> 
> With that, LaTeX will stop at the offending line from the .tex file.
> 
> On a quick test here, I'm getting these at Fedora 35:
> 
> 	(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty)
> 
> 	! LaTeX Error: File `ctexhook.sty' not found.
> 
> 	Type X to quit or <RETURN> to proceed,
> 	or enter new name. (Default extension: sty)
> 
> It seems that a recent change (probably to better address issues with 
> Chinese and Japanese translation) added an extra dependency to some
> stylesheet.
> 
> I solved it by installing this package: "texlive-ctex".

There is no texlive-ctex on Debian, but ctexhook.sty is installed as
part of texlive-extra-utils.  Here are the last lines from the
interactive run:

(/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty)
(/usr/share/texlive/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
Writing index file RCU.idx
(./RCU.aux)
Runaway argument?
{\contentsline {chapter}{\numberline {16}A Tour Through TREE\_RCU’s\ETC.
! File ended while scanning use of \@writefile.
<inserted text> 
                \par 
l.191 \begin{document}

? 


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  6:47       ` make pdfdocs fails on Debian stable Christoph Hellwig
@ 2022-01-04  7:32         ` Akira Yokosawa
  2022-01-04  7:36           ` Christoph Hellwig
  0 siblings, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  7:32 UTC (permalink / raw)
  To: hch; +Cc: corbet, linux-doc, linux-kernel, mchehab

Hi Christoph,

On Tue, 4 Jan 2022 07:47:08 +0100, Christoph Hellwig wrote:
> On Mon, Jan 03, 2022 at 09:58:31PM +0100, Mauro Carvalho Chehab wrote:
>> Ah, the error is specific to RCU.tex then?
> 
> Yes.
> 
>> 
>> You'll need to re-run xelatex with -interaction=interactive, in
>> order to be able to identify what's the root cause.
>> 
>> You could do this by using LATEXOPTS, e. g.:
>> 
>> 	$ make SPHINXDIRS=RCU LATEXOPTS="-interaction=interactive" pdfdocs
>> 
>> With that, LaTeX will stop at the offending line from the .tex file.
>> 
>> On a quick test here, I'm getting these at Fedora 35:
>> 
>> 	(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty)
>> 
>> 	! LaTeX Error: File `ctexhook.sty' not found.
>> 
>> 	Type X to quit or <RETURN> to proceed,
>> 	or enter new name. (Default extension: sty)
>> 
>> It seems that a recent change (probably to better address issues with 
>> Chinese and Japanese translation) added an extra dependency to some
>> stylesheet.
>> 
>> I solved it by installing this package: "texlive-ctex".
> 
> There is no texlive-ctex on Debian, but ctexhook.sty is installed as
> part of texlive-extra-utils.  Here are the last lines from the
> interactive run:
> 
> (/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty)
> (/usr/share/texlive/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg))
> (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
> Writing index file RCU.idx
> (./RCU.aux)
> Runaway argument?
> {\contentsline {chapter}{\numberline {16}A Tour Through TREE\_RCU’s\ETC.
> ! File ended while scanning use of \@writefile.
> <inserted text> 
>                 \par 
> l.191 \begin{document}
> 
> ? 

I suspect you are suffering from corrupt RCU.aux (or whatever other
intermediate files xelatex generates).

What happens you run

    $ make cleandocs

before

    $ make SPHINXDIRS=RCU LATEXOPTS="-interaction=interactive" pdfdocs

?

        Thanks, Akira





^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  7:32         ` Akira Yokosawa
@ 2022-01-04  7:36           ` Christoph Hellwig
  2022-01-04  7:53             ` Akira Yokosawa
  2022-01-04  9:31             ` Akira Yokosawa
  0 siblings, 2 replies; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-04  7:36 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: hch, corbet, linux-doc, linux-kernel, mchehab

On Tue, Jan 04, 2022 at 04:32:14PM +0900, Akira Yokosawa wrote:
> I suspect you are suffering from corrupt RCU.aux (or whatever other
> intermediate files xelatex generates).
> 
> What happens you run
> 
>     $ make cleandocs
> 
> before
> 
>     $ make SPHINXDIRS=RCU LATEXOPTS="-interaction=interactive" pdfdocs
> 
> ?

The last lines of that below:

LaTeX Warning: Float too large for page by 8477.29312pt on input line 10581.


LaTeX Warning: Hyper reference `Design/Memory-Ordering/Tree-RCU-Memory-Ordering
:forcing-quiescent-states' on page 104 undefined on input line 10593.


LaTeX Warning: Float too large for page by 9533.29312pt on input line 11384.


LaTeX Warning: Hyper reference `Design/Memory-Ordering/Tree-RCU-Memory-Ordering
:forcing-quiescent-states' on page 104 undefined on input line 11394.

[104] [105] [106]
! Dimension too large.
\color@b@x ... #3}\kern \fboxsep }\dimen@ \ht \z@ 
                                                  \advance \dimen@ \fboxsep ...
l.12718 \end{sphinxVerbatim}

? 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  7:36           ` Christoph Hellwig
@ 2022-01-04  7:53             ` Akira Yokosawa
  2022-01-04  7:56               ` Christoph Hellwig
  2022-01-04  9:31             ` Akira Yokosawa
  1 sibling, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  7:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: corbet, linux-doc, linux-kernel, mchehab

On Tue, 4 Jan 2022 08:36:25 +0100, Christoph Hellwig wrote:
> On Tue, Jan 04, 2022 at 04:32:14PM +0900, Akira Yokosawa wrote:
>> I suspect you are suffering from corrupt RCU.aux (or whatever other
>> intermediate files xelatex generates).
>>
>> What happens you run
>>
>>     $ make cleandocs
>>
>> before
>>
>>     $ make SPHINXDIRS=RCU LATEXOPTS="-interaction=interactive" pdfdocs
>>
>> ?
> 
> The last lines of that below:
> 
> LaTeX Warning: Float too large for page by 8477.29312pt on input line 10581.
> 
> 
> LaTeX Warning: Hyper reference `Design/Memory-Ordering/Tree-RCU-Memory-Ordering
> :forcing-quiescent-states' on page 104 undefined on input line 10593.
> 
> 
> LaTeX Warning: Float too large for page by 9533.29312pt on input line 11384.
> 
> 
> LaTeX Warning: Hyper reference `Design/Memory-Ordering/Tree-RCU-Memory-Ordering
> :forcing-quiescent-states' on page 104 undefined on input line 11394.
> 
> [104] [105] [106]
> ! Dimension too large.
> \color@b@x ... #3}\kern \fboxsep }\dimen@ \ht \z@ 
>                                                   \advance \dimen@ \fboxsep ...
> l.12718 \end{sphinxVerbatim}
> 
> ? 
> 

Hmm, I can't reproduce this on docs-next.
On which tree are you building RCU.pdf?

        Thanks, Akira


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  7:53             ` Akira Yokosawa
@ 2022-01-04  7:56               ` Christoph Hellwig
  2022-01-04  8:07                 ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-04  7:56 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: Christoph Hellwig, corbet, linux-doc, linux-kernel, mchehab

On Tue, Jan 04, 2022 at 04:53:15PM +0900, Akira Yokosawa wrote:
> Hmm, I can't reproduce this on docs-next.
> On which tree are you building RCU.pdf?

Current linux-next.  But I've also seen it with mainline from a few days
ago.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-04  1:54               ` Akira Yokosawa
@ 2022-01-04  8:05                 ` Mauro Carvalho Chehab
  2022-01-04 10:26                   ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-04  8:05 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: hch, linux-doc, linux-kernel, corbet

Em Tue, 4 Jan 2022 10:54:52 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:

> Hi Mauro, see inline comments below.
> 
> On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:
> > Hi,
> > 
> > On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:  
> >> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
> >>  
> >>> After a change meant to fix support for oriental characters
> >>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
> >>> for PDF output.  
> > 
> > FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
> > in June 2021.
> > 
> >         Thanks, Akira
> >   
> >>>
> >>> Reported-by: Christoph Hellwig <hch@lst.de>
> >>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> >>> ---
> >>>
> >>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
> >>>
> >>>  scripts/sphinx-pre-install | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> >>> index 288e86a9d1e5..46aaab414098 100755
> >>> --- a/scripts/sphinx-pre-install
> >>> +++ b/scripts/sphinx-pre-install
> >>> @@ -78,6 +78,7 @@ my %texlive = (
> >>>  	'ucs.sty'            => 'texlive-ucs',
> >>>  	'upquote.sty'        => 'texlive-upquote',
> >>>  	'wrapfig.sty'        => 'texlive-wrapfig',
> >>> +	'ctexhook.sty'       => 'texlive-ctex',
> >>>  );  
> >>  
> 
> I'm afraid this update of the list for Fedora/openSUSE won't help
> Debian Stable (bullseye) users.
> 
> ctexhook.sty is in texlive-lang-chinese on Debian/Ubuntu.

On such case, it is needed to map it for Debian/Ubuntu.
Could you please test the enclosed patch, applied on the top
of the previous one?

Thanks!
Mauro

-

[PATCH] scripts: sphinx-pre-install: Fix ctex support on Debian

The name of the package with ctexhook.sty is different on
Debian/Ubuntu.

Reported-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 46aaab414098..ea96d18ee946 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -367,6 +367,7 @@ sub give_debian_hints()
 		"Pod::Usage"		=> "perl-modules",
 		"xelatex"		=> "texlive-xetex",
 		"rsvg-convert"		=> "librsvg2-bin",
+		"texlive-ctex"		=> "texlive-lang-chinese",
 	);
 
 	if ($pdf) {

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  7:56               ` Christoph Hellwig
@ 2022-01-04  8:07                 ` Akira Yokosawa
  2022-01-04  8:16                   ` Christoph Hellwig
  0 siblings, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  8:07 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: corbet, linux-doc, linux-kernel, mchehab

On Tue, 4 Jan 2022 08:56:55 +0100, Christoph Hellwig wrote:
> On Tue, Jan 04, 2022 at 04:53:15PM +0900, Akira Yokosawa wrote:
>> Hmm, I can't reproduce this on docs-next.
>> On which tree are you building RCU.pdf?
> 
> Current linux-next.  But I've also seen it with mainline from a few days
> ago.
> 

Still can't reproduce with sphinx-build 4.3.2 on Debian bullseye.

What version of Sphinx are you using?


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  8:07                 ` Akira Yokosawa
@ 2022-01-04  8:16                   ` Christoph Hellwig
  2022-01-04  8:44                     ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-04  8:16 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: Christoph Hellwig, corbet, linux-doc, linux-kernel, mchehab

On Tue, Jan 04, 2022 at 05:07:20PM +0900, Akira Yokosawa wrote:
> > Current linux-next.  But I've also seen it with mainline from a few days
> > ago.
> > 
> 
> Still can't reproduce with sphinx-build 4.3.2 on Debian bullseye.
> 
> What version of Sphinx are you using?

The one that comes from Debian:

hch@brick:~/work/linux-next$ sphinx-build --version
sphinx-build 3.4.3

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  8:16                   ` Christoph Hellwig
@ 2022-01-04  8:44                     ` Akira Yokosawa
  0 siblings, 0 replies; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  8:44 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: corbet, linux-doc, linux-kernel, mchehab

On Tue, 4 Jan 2022 09:16:54 +0100, Christoph Hellwig wrote:
> On Tue, Jan 04, 2022 at 05:07:20PM +0900, Akira Yokosawa wrote:
>>> Current linux-next.  But I've also seen it with mainline from a few days
>>> ago.
>>>
>>
>> Still can't reproduce with sphinx-build 4.3.2 on Debian bullseye.
>>
>> What version of Sphinx are you using?
> 
> The one that comes from Debian:
> 
> hch@brick:~/work/linux-next$ sphinx-build --version
> sphinx-build 3.4.3
> 

Ah, I'm not able to test distro Python packages at the moment.

At least I tried Sphinx 3.4.3 installed in a venv, but I could not
reproduce the error you encountered.

Hmm??


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  7:36           ` Christoph Hellwig
  2022-01-04  7:53             ` Akira Yokosawa
@ 2022-01-04  9:31             ` Akira Yokosawa
  2022-01-04 13:19               ` Christoph Hellwig
  1 sibling, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04  9:31 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: corbet, linux-doc, linux-kernel, mchehab

On Tue, 4 Jan 2022 08:36:25 +0100, Christoph Hellwig wrote:
> On Tue, Jan 04, 2022 at 04:32:14PM +0900, Akira Yokosawa wrote:
>> I suspect you are suffering from corrupt RCU.aux (or whatever other
>> intermediate files xelatex generates).
>>
>> What happens you run
>>
>>     $ make cleandocs
>>
>> before
>>
>>     $ make SPHINXDIRS=RCU LATEXOPTS="-interaction=interactive" pdfdocs
>>
>> ?
> 
> The last lines of that below:
> 
> LaTeX Warning: Float too large for page by 8477.29312pt on input line 10581.
> 
> 
> LaTeX Warning: Hyper reference `Design/Memory-Ordering/Tree-RCU-Memory-Ordering
> :forcing-quiescent-states' on page 104 undefined on input line 10593.
> 
> 
> LaTeX Warning: Float too large for page by 9533.29312pt on input line 11384.
> 
> 
> LaTeX Warning: Hyper reference `Design/Memory-Ordering/Tree-RCU-Memory-Ordering
> :forcing-quiescent-states' on page 104 undefined on input line 11394.
> 
> [104] [105] [106]
> ! Dimension too large.
> \color@b@x ... #3}\kern \fboxsep }\dimen@ \ht \z@ 
>                                                   \advance \dimen@ \fboxsep ...
> l.12718 \end{sphinxVerbatim}
> 
> ? 
> 

Hi, getting back to the error message, I remember seeing a similar error
when I failed to permit PDF output of ImageMagick.

What I did back then was this (as root):

 # cd /etc/ImageMagick-6  
 # sed -i 's+policy domain="coder" rights="none" pattern="PDF"+policy domain="coder" rights="read|write" pattern="PDF"+' policy.xml ; \

In case this resolves your issue.

        Thanks, Akira

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-04  8:05                 ` Mauro Carvalho Chehab
@ 2022-01-04 10:26                   ` Akira Yokosawa
  2022-01-05  7:48                     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04 10:26 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: hch, linux-doc, linux-kernel, corbet

On Tue, 4 Jan 2022 09:05:48 +0100, Mauro Carvalho Chehab wrote:
> Em Tue, 4 Jan 2022 10:54:52 +0900
> Akira Yokosawa <akiyks@gmail.com> escreveu:
> 
>> Hi Mauro, see inline comments below.
>>
>> On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:
>>> Hi,
>>>
>>> On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:  
>>>> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
>>>>  
>>>>> After a change meant to fix support for oriental characters
>>>>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
>>>>> for PDF output.  
>>>
>>> FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
>>> in June 2021.
>>>
>>>         Thanks, Akira
>>>   
>>>>>
>>>>> Reported-by: Christoph Hellwig <hch@lst.de>
>>>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
>>>>> ---
>>>>>
>>>>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
>>>>>
>>>>>  scripts/sphinx-pre-install | 1 +
>>>>>  1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
>>>>> index 288e86a9d1e5..46aaab414098 100755
>>>>> --- a/scripts/sphinx-pre-install
>>>>> +++ b/scripts/sphinx-pre-install
>>>>> @@ -78,6 +78,7 @@ my %texlive = (
>>>>>  	'ucs.sty'            => 'texlive-ucs',
>>>>>  	'upquote.sty'        => 'texlive-upquote',
>>>>>  	'wrapfig.sty'        => 'texlive-wrapfig',
>>>>> +	'ctexhook.sty'       => 'texlive-ctex',
>>>>>  );  
>>>>  
>>
>> I'm afraid this update of the list for Fedora/openSUSE won't help
>> Debian Stable (bullseye) users.
>>
>> ctexhook.sty is in texlive-lang-chinese on Debian/Ubuntu.
> 
> On such case, it is needed to map it for Debian/Ubuntu.
> Could you please test the enclosed patch, applied on the top
> of the previous one?

Looks like we need an additional hunk.  See below.

        Thanks, Akira

> 
> Thanks!
> Mauro
> 
> -
> 
> [PATCH] scripts: sphinx-pre-install: Fix ctex support on Debian
> 
> The name of the package with ctexhook.sty is different on
> Debian/Ubuntu.
> 
> Reported-by: Akira Yokosawa <akiyks@gmail.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> 
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index 46aaab414098..ea96d18ee946 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -367,6 +367,7 @@ sub give_debian_hints()
>  		"Pod::Usage"		=> "perl-modules",
>  		"xelatex"		=> "texlive-xetex",
>  		"rsvg-convert"		=> "librsvg2-bin",
> +		"texlive-ctex"		=> "texlive-lang-chinese",
>  	);
>  
>  	if ($pdf) {
> 
@@ -380,6 +381,7 @@ sub give_debian_hints()
        }
 
        check_program("dvipng", 2) if ($pdf);
+       check_missing_tex(2) if ($pdf);
        check_missing(\%map);
 
        return if (!$need && !$optional);


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04  9:31             ` Akira Yokosawa
@ 2022-01-04 13:19               ` Christoph Hellwig
  2022-01-04 13:46                 ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-04 13:19 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: Christoph Hellwig, corbet, linux-doc, linux-kernel, mchehab

On Tue, Jan 04, 2022 at 06:31:01PM +0900, Akira Yokosawa wrote:
> Hi, getting back to the error message, I remember seeing a similar error
> when I failed to permit PDF output of ImageMagick.
> 
> What I did back then was this (as root):
> 
>  # cd /etc/ImageMagick-6  
>  # sed -i 's+policy domain="coder" rights="none" pattern="PDF"+policy domain="coder" rights="read|write" pattern="PDF"+' policy.xml ; \
> 
> In case this resolves your issue.

I've definitively seen permission denied errors earlier in the (rather
noisy) build log.  But I absolutely do not feel comfortable changing
global security policies for a kernel build, especially for something
like ImageMagic that had its fair share of security issues.  Is there any
way to side step this by using a different tool?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04 13:19               ` Christoph Hellwig
@ 2022-01-04 13:46                 ` Akira Yokosawa
  2022-01-05  1:47                   ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-04 13:46 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: corbet, linux-doc, linux-kernel, mchehab

On Tue, 4 Jan 2022 14:19:52 +0100, Christoph Hellwig wrote:
> On Tue, Jan 04, 2022 at 06:31:01PM +0900, Akira Yokosawa wrote:
>> Hi, getting back to the error message, I remember seeing a similar error
>> when I failed to permit PDF output of ImageMagick.
>>
>> What I did back then was this (as root):
>>
>>  # cd /etc/ImageMagick-6  
>>  # sed -i 's+policy domain="coder" rights="none" pattern="PDF"+policy domain="coder" rights="read|write" pattern="PDF"+' policy.xml ; \
>>
>> In case this resolves your issue.
> 
> I've definitively seen permission denied errors earlier in the (rather
> noisy) build log.  But I absolutely do not feel comfortable changing
> global security policies for a kernel build, especially for something
> like ImageMagic that had its fair share of security issues.  Is there any
> way to side step this by using a different tool?
> 

See my pending patch set at:

    https://lore.kernel.org/linux-doc/e01fe9f9-f600-c2fc-c6b3-ef6395655ffe@gmail.com
    [PATCH v2 0/4] docs: sphinx/kfigure.py: Improve conversion to PDF

This uses Inkscape if it is available instead of ImageMagick.
No imagemagick nor librsvg2-bin is required.
As long as if you can trust Inkscape...

Good luck!

        Thanks, Akira

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-04 13:46                 ` Akira Yokosawa
@ 2022-01-05  1:47                   ` Akira Yokosawa
  2022-01-05  7:35                     ` Christoph Hellwig
  0 siblings, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-05  1:47 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: corbet, linux-doc, linux-kernel, mchehab

On Tue, 4 Jan 2022 22:46:57 +0900, Akira Yokosawa wrote:
> On Tue, 4 Jan 2022 14:19:52 +0100, Christoph Hellwig wrote:
>> On Tue, Jan 04, 2022 at 06:31:01PM +0900, Akira Yokosawa wrote:
>>> Hi, getting back to the error message, I remember seeing a similar error
>>> when I failed to permit PDF output of ImageMagick.
>>>
>>> What I did back then was this (as root):
>>>
>>>  # cd /etc/ImageMagick-6  
>>>  # sed -i 's+policy domain="coder" rights="none" pattern="PDF"+policy domain="coder" rights="read|write" pattern="PDF"+' policy.xml ; \
>>>
>>> In case this resolves your issue.
>>
>> I've definitively seen permission denied errors earlier in the (rather
>> noisy) build log.  But I absolutely do not feel comfortable changing
>> global security policies for a kernel build, especially for something
>> like ImageMagic that had its fair share of security issues.  Is there any
>> way to side step this by using a different tool?
>>
> 
> See my pending patch set at:
> 
>     https://lore.kernel.org/linux-doc/e01fe9f9-f600-c2fc-c6b3-ef6395655ffe@gmail.com
>     [PATCH v2 0/4] docs: sphinx/kfigure.py: Improve conversion to PDF
> 
> This uses Inkscape if it is available instead of ImageMagick.
> No imagemagick nor librsvg2-bin is required.
> As long as if you can trust Inkscape...
> 
> Good luck!

Alternatively, you can avoid ImageMagick by installing
graphicsmagick-imagemagick-compat instead of imagemagick.

I'm not sure what you think of GraphicsMagick, though.

If you'd like to try, do:

    $ sudo apt install graphicsmagick-imagemagick-compat ghostscript gsfonts-x11

This will remove ImageMagick.
(You have ghostscript and gsfonts-x11 already installed, I guess.)

        Thanks, Akira

> 
>         Thanks, Akira
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-05  1:47                   ` Akira Yokosawa
@ 2022-01-05  7:35                     ` Christoph Hellwig
  2022-01-05 12:03                       ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2022-01-05  7:35 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: Christoph Hellwig, corbet, linux-doc, linux-kernel, mchehab

On Wed, Jan 05, 2022 at 10:47:40AM +0900, Akira Yokosawa wrote:
> > See my pending patch set at:
> > 
> >     https://lore.kernel.org/linux-doc/e01fe9f9-f600-c2fc-c6b3-ef6395655ffe@gmail.com
> >     [PATCH v2 0/4] docs: sphinx/kfigure.py: Improve conversion to PDF
> > 
> > This uses Inkscape if it is available instead of ImageMagick.
> > No imagemagick nor librsvg2-bin is required.
> > As long as if you can trust Inkscape...

I haven't gotten to try that yet..

> Alternatively, you can avoid ImageMagick by installing
> graphicsmagick-imagemagick-compat instead of imagemagick.
> 
> I'm not sure what you think of GraphicsMagick, though.
> 
> If you'd like to try, do:
> 
>     $ sudo apt install graphicsmagick-imagemagick-compat ghostscript gsfonts-x11
> 
> This will remove ImageMagick.
> (You have ghostscript and gsfonts-x11 already installed, I guess.)

This works just fine, thanks.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-04 10:26                   ` Akira Yokosawa
@ 2022-01-05  7:48                     ` Mauro Carvalho Chehab
  2022-01-05 12:09                       ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-05  7:48 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: hch, linux-doc, linux-kernel, corbet

Em Tue, 4 Jan 2022 19:26:10 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:

> On Tue, 4 Jan 2022 09:05:48 +0100, Mauro Carvalho Chehab wrote:
> > Em Tue, 4 Jan 2022 10:54:52 +0900
> > Akira Yokosawa <akiyks@gmail.com> escreveu:
> >   
> >> Hi Mauro, see inline comments below.
> >>
> >> On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:  
> >>> Hi,
> >>>
> >>> On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:    
> >>>> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
> >>>>    
> >>>>> After a change meant to fix support for oriental characters
> >>>>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
> >>>>> for PDF output.    
> >>>
> >>> FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
> >>> in June 2021.
> >>>
> >>>         Thanks, Akira
> >>>     
> >>>>>
> >>>>> Reported-by: Christoph Hellwig <hch@lst.de>
> >>>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> >>>>> ---
> >>>>>
> >>>>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
> >>>>>
> >>>>>  scripts/sphinx-pre-install | 1 +
> >>>>>  1 file changed, 1 insertion(+)
> >>>>>
> >>>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> >>>>> index 288e86a9d1e5..46aaab414098 100755
> >>>>> --- a/scripts/sphinx-pre-install
> >>>>> +++ b/scripts/sphinx-pre-install
> >>>>> @@ -78,6 +78,7 @@ my %texlive = (
> >>>>>  	'ucs.sty'            => 'texlive-ucs',
> >>>>>  	'upquote.sty'        => 'texlive-upquote',
> >>>>>  	'wrapfig.sty'        => 'texlive-wrapfig',
> >>>>> +	'ctexhook.sty'       => 'texlive-ctex',
> >>>>>  );    
> >>>>    
> >>
> >> I'm afraid this update of the list for Fedora/openSUSE won't help
> >> Debian Stable (bullseye) users.
> >>
> >> ctexhook.sty is in texlive-lang-chinese on Debian/Ubuntu.  
> > 
> > On such case, it is needed to map it for Debian/Ubuntu.
> > Could you please test the enclosed patch, applied on the top
> > of the previous one?  
> 
> Looks like we need an additional hunk.  See below.
> 
>         Thanks, Akira
> 
> > 
> > Thanks!
> > Mauro
> > 
> > -
> > 
> > [PATCH] scripts: sphinx-pre-install: Fix ctex support on Debian
> > 
> > The name of the package with ctexhook.sty is different on
> > Debian/Ubuntu.
> > 
> > Reported-by: Akira Yokosawa <akiyks@gmail.com>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> > 
> > diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> > index 46aaab414098..ea96d18ee946 100755
> > --- a/scripts/sphinx-pre-install
> > +++ b/scripts/sphinx-pre-install
> > @@ -367,6 +367,7 @@ sub give_debian_hints()
> >  		"Pod::Usage"		=> "perl-modules",
> >  		"xelatex"		=> "texlive-xetex",
> >  		"rsvg-convert"		=> "librsvg2-bin",
> > +		"texlive-ctex"		=> "texlive-lang-chinese",
> >  	);
> >  
> >  	if ($pdf) {
> >   
> @@ -380,6 +381,7 @@ sub give_debian_hints()
>         }
>  
>         check_program("dvipng", 2) if ($pdf);
> +       check_missing_tex(2) if ($pdf);
>         check_missing(\%map);
>  
>         return if (!$need && !$optional);
> 

This would be more complex than that, and per-distro tests are
required, in order to avoid the script to fail on other
distros.

Something like the following (possibly incomplete) patch.

Thanks,
Mauro

[PATCH RFC] scripts: sphinx-pre-install: better handle pdf dependencies

Not all distro hints check for missing LaTeX dependencies.
So add a call for it for check_missing_tex() to all distros.

While here, change the parameters to pass the map hash, as
distro-specific mapping could be needed.

Reported-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index ea96d18ee946..03c252590e54 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -227,7 +227,8 @@ sub check_pacman_missing($$)
 
 sub check_missing_tex($)
 {
-	my $is_optional = shift;
+	my $map = %{$_[0]};
+	my $is_optional = 2;
 	my $kpsewhich = findprog("kpsewhich");
 
 	foreach my $prog(keys %texlive) {
@@ -381,6 +382,7 @@ sub give_debian_hints()
 	}
 
 	check_program("dvipng", 2) if ($pdf);
+	check_missing_tex(\%map) if ($pdf);
 	check_missing(\%map);
 
 	return if (!$need && !$optional);
@@ -449,7 +451,7 @@ sub give_redhat_hints()
 
 	check_rpm_missing(\@fedora26_opt_pkgs, 2) if ($pdf && !$old);
 	check_rpm_missing(\@fedora_tex_pkgs, 2) if ($pdf);
-	check_missing_tex(2) if ($pdf);
+	check_missing_tex(\%map) if ($pdf);
 	check_missing(\%map);
 
 	return if (!$need && !$optional);
@@ -503,7 +505,7 @@ sub give_opensuse_hints()
 	# "Noto Sans CJK SC" on openSUSE
 
 	check_rpm_missing(\@suse_tex_pkgs, 2) if ($pdf);
-	check_missing_tex(2) if ($pdf);
+	check_missing_tex(\%map) if ($pdf);
 	check_missing(\%map);
 
 	return if (!$need && !$optional);
@@ -548,6 +550,7 @@ sub give_mageia_hints()
 	}
 
 	check_rpm_missing(\@tex_pkgs, 2) if ($pdf);
+	# check_missing_tex(\%map) if ($pdf);
 	check_missing(\%map);
 
 	return if (!$need && !$optional);
@@ -578,6 +581,7 @@ sub give_arch_linux_hints()
 				   "noto-fonts-cjk", 2);
 	}
 
+	check_missing_tex(\%map) if ($pdf);
 	check_missing(\%map);
 
 	return if (!$need && !$optional);
@@ -604,6 +608,8 @@ sub give_gentoo_hints()
 				   "media-fonts/noto-cjk", 2);
 	}
 
+	# Gentoo doesn't need to map tex, as there's a single package,
+	# and extra fonts are mapped via check_missing_file()
 	check_missing(\%map);
 
 	return if (!$need && !$optional);
@@ -622,7 +628,7 @@ sub give_gentoo_hints()
 		printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n");
 	}
 
-	printf("\tsudo emerge --ask $install\n");
+	printf("\tsudo USE="-cjk" emerge --ask $install\n");
 
 }
 
@@ -685,7 +691,7 @@ sub check_distros()
 	my %map = (
 		"sphinx-build" => "sphinx"
 	);
-	check_missing_tex(2) if ($pdf);
+	check_missing_tex(\%map) if ($pdf);
 	check_missing(\%map);
 	print "I don't know distro $system_release.\n";
 	print "So, I can't provide you a hint with the install procedure.\n";


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: make pdfdocs fails on Debian stable
  2022-01-05  7:35                     ` Christoph Hellwig
@ 2022-01-05 12:03                       ` Akira Yokosawa
  0 siblings, 0 replies; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-05 12:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: corbet, linux-doc, linux-kernel, mchehab

On Wed, 5 Jan 2022 08:35:04 +0100, Christoph Hellwig wrote:
> On Wed, Jan 05, 2022 at 10:47:40AM +0900, Akira Yokosawa wrote:
>>> See my pending patch set at:
>>>
>>>     https://lore.kernel.org/linux-doc/e01fe9f9-f600-c2fc-c6b3-ef6395655ffe@gmail.com
>>>     [PATCH v2 0/4] docs: sphinx/kfigure.py: Improve conversion to PDF
>>>
>>> This uses Inkscape if it is available instead of ImageMagick.
>>> No imagemagick nor librsvg2-bin is required.
>>> As long as if you can trust Inkscape...
> 
> I haven't gotten to try that yet..
> 
>> Alternatively, you can avoid ImageMagick by installing
>> graphicsmagick-imagemagick-compat instead of imagemagick.
>>
>> I'm not sure what you think of GraphicsMagick, though.
>>
>> If you'd like to try, do:
>>
>>     $ sudo apt install graphicsmagick-imagemagick-compat ghostscript gsfonts-x11
>>
>> This will remove ImageMagick.
>> (You have ghostscript and gsfonts-x11 already installed, I guess.)
> 
> This works just fine, thanks.

Nice!

Glad to know I could help you.

        Thanks, Akira

> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-05  7:48                     ` Mauro Carvalho Chehab
@ 2022-01-05 12:09                       ` Akira Yokosawa
  2022-01-05 21:42                         ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-05 12:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: hch, linux-doc, linux-kernel, corbet

On Wed, 5 Jan 2022 08:48:09 +0100, Mauro Carvalho Chehab wrote:
> Em Tue, 4 Jan 2022 19:26:10 +0900
> Akira Yokosawa <akiyks@gmail.com> escreveu:
> 
>> On Tue, 4 Jan 2022 09:05:48 +0100, Mauro Carvalho Chehab wrote:
>>> Em Tue, 4 Jan 2022 10:54:52 +0900
>>> Akira Yokosawa <akiyks@gmail.com> escreveu:
>>>   
>>>> Hi Mauro, see inline comments below.
>>>>
>>>> On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:  
>>>>> Hi,
>>>>>
>>>>> On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:    
>>>>>> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
>>>>>>    
>>>>>>> After a change meant to fix support for oriental characters
>>>>>>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
>>>>>>> for PDF output.    
>>>>>
>>>>> FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
>>>>> in June 2021.
>>>>>
>>>>>         Thanks, Akira
>>>>>     
>>>>>>>
>>>>>>> Reported-by: Christoph Hellwig <hch@lst.de>
>>>>>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
>>>>>>> ---
>>>>>>>
>>>>>>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
>>>>>>>
>>>>>>>  scripts/sphinx-pre-install | 1 +
>>>>>>>  1 file changed, 1 insertion(+)
>>>>>>>
>>>>>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
>>>>>>> index 288e86a9d1e5..46aaab414098 100755
>>>>>>> --- a/scripts/sphinx-pre-install
>>>>>>> +++ b/scripts/sphinx-pre-install
>>>>>>> @@ -78,6 +78,7 @@ my %texlive = (
>>>>>>>  	'ucs.sty'            => 'texlive-ucs',
>>>>>>>  	'upquote.sty'        => 'texlive-upquote',
>>>>>>>  	'wrapfig.sty'        => 'texlive-wrapfig',
>>>>>>> +	'ctexhook.sty'       => 'texlive-ctex',
>>>>>>>  );    
>>>>>>    
>>>>
>>>> I'm afraid this update of the list for Fedora/openSUSE won't help
>>>> Debian Stable (bullseye) users.
>>>>
>>>> ctexhook.sty is in texlive-lang-chinese on Debian/Ubuntu.  
>>>
>>> On such case, it is needed to map it for Debian/Ubuntu.
>>> Could you please test the enclosed patch, applied on the top
>>> of the previous one?  
>>
>> Looks like we need an additional hunk.  See below.
>>
>>         Thanks, Akira
>>
>>>
>>> Thanks!
>>> Mauro
>>>
>>> -
>>>
>>> [PATCH] scripts: sphinx-pre-install: Fix ctex support on Debian
>>>
>>> The name of the package with ctexhook.sty is different on
>>> Debian/Ubuntu.
>>>
>>> Reported-by: Akira Yokosawa <akiyks@gmail.com>
>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
>>>
>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
>>> index 46aaab414098..ea96d18ee946 100755
>>> --- a/scripts/sphinx-pre-install
>>> +++ b/scripts/sphinx-pre-install
>>> @@ -367,6 +367,7 @@ sub give_debian_hints()
>>>  		"Pod::Usage"		=> "perl-modules",
>>>  		"xelatex"		=> "texlive-xetex",
>>>  		"rsvg-convert"		=> "librsvg2-bin",
>>> +		"texlive-ctex"		=> "texlive-lang-chinese",
>>>  	);
>>>  
>>>  	if ($pdf) {
>>>   
>> @@ -380,6 +381,7 @@ sub give_debian_hints()
>>         }
>>  
>>         check_program("dvipng", 2) if ($pdf);
>> +       check_missing_tex(2) if ($pdf);
>>         check_missing(\%map);
>>  
>>         return if (!$need && !$optional);
>>
> 
> This would be more complex than that, and per-distro tests are
> required, in order to avoid the script to fail on other
> distros.

Thank you for looking into this!
I must admit I'm far from grasping how this perl script works...

> 
> Something like the following (possibly incomplete) patch.

I'll test it under various distros/setups.
It may take a while.

        Thanks, Akira

> 
> Thanks,
> Mauro
> 
> [PATCH RFC] scripts: sphinx-pre-install: better handle pdf dependencies
> 
> Not all distro hints check for missing LaTeX dependencies.
> So add a call for it for check_missing_tex() to all distros.
> 
> While here, change the parameters to pass the map hash, as
> distro-specific mapping could be needed.
> 
> Reported-by: Akira Yokosawa <akiyks@gmail.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> 
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index ea96d18ee946..03c252590e54 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -227,7 +227,8 @@ sub check_pacman_missing($$)
>  
>  sub check_missing_tex($)
>  {
> -	my $is_optional = shift;
> +	my $map = %{$_[0]};
> +	my $is_optional = 2;
>  	my $kpsewhich = findprog("kpsewhich");
>  
>  	foreach my $prog(keys %texlive) {
> @@ -381,6 +382,7 @@ sub give_debian_hints()
>  	}
>  
>  	check_program("dvipng", 2) if ($pdf);
> +	check_missing_tex(\%map) if ($pdf);
>  	check_missing(\%map);
>  
>  	return if (!$need && !$optional);
> @@ -449,7 +451,7 @@ sub give_redhat_hints()
>  
>  	check_rpm_missing(\@fedora26_opt_pkgs, 2) if ($pdf && !$old);
>  	check_rpm_missing(\@fedora_tex_pkgs, 2) if ($pdf);
> -	check_missing_tex(2) if ($pdf);
> +	check_missing_tex(\%map) if ($pdf);
>  	check_missing(\%map);
>  
>  	return if (!$need && !$optional);
> @@ -503,7 +505,7 @@ sub give_opensuse_hints()
>  	# "Noto Sans CJK SC" on openSUSE
>  
>  	check_rpm_missing(\@suse_tex_pkgs, 2) if ($pdf);
> -	check_missing_tex(2) if ($pdf);
> +	check_missing_tex(\%map) if ($pdf);
>  	check_missing(\%map);
>  
>  	return if (!$need && !$optional);
> @@ -548,6 +550,7 @@ sub give_mageia_hints()
>  	}
>  
>  	check_rpm_missing(\@tex_pkgs, 2) if ($pdf);
> +	# check_missing_tex(\%map) if ($pdf);
>  	check_missing(\%map);
>  
>  	return if (!$need && !$optional);
> @@ -578,6 +581,7 @@ sub give_arch_linux_hints()
>  				   "noto-fonts-cjk", 2);
>  	}
>  
> +	check_missing_tex(\%map) if ($pdf);
>  	check_missing(\%map);
>  
>  	return if (!$need && !$optional);
> @@ -604,6 +608,8 @@ sub give_gentoo_hints()
>  				   "media-fonts/noto-cjk", 2);
>  	}
>  
> +	# Gentoo doesn't need to map tex, as there's a single package,
> +	# and extra fonts are mapped via check_missing_file()
>  	check_missing(\%map);
>  
>  	return if (!$need && !$optional);
> @@ -622,7 +628,7 @@ sub give_gentoo_hints()
>  		printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n");
>  	}
>  
> -	printf("\tsudo emerge --ask $install\n");
> +	printf("\tsudo USE="-cjk" emerge --ask $install\n");
>  
>  }
>  
> @@ -685,7 +691,7 @@ sub check_distros()
>  	my %map = (
>  		"sphinx-build" => "sphinx"
>  	);
> -	check_missing_tex(2) if ($pdf);
> +	check_missing_tex(\%map) if ($pdf);
>  	check_missing(\%map);
>  	print "I don't know distro $system_release.\n";
>  	print "So, I can't provide you a hint with the install procedure.\n";
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-05 12:09                       ` Akira Yokosawa
@ 2022-01-05 21:42                         ` Mauro Carvalho Chehab
  2022-01-05 22:57                           ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-05 21:42 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: hch, linux-doc, linux-kernel, corbet

Em Wed, 5 Jan 2022 21:09:59 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:

> On Wed, 5 Jan 2022 08:48:09 +0100, Mauro Carvalho Chehab wrote:
> > Em Tue, 4 Jan 2022 19:26:10 +0900
> > Akira Yokosawa <akiyks@gmail.com> escreveu:
> > 
> >> On Tue, 4 Jan 2022 09:05:48 +0100, Mauro Carvalho Chehab wrote:
> >>> Em Tue, 4 Jan 2022 10:54:52 +0900
> >>> Akira Yokosawa <akiyks@gmail.com> escreveu:
> >>>   
> >>>> Hi Mauro, see inline comments below.
> >>>>
> >>>> On Tue, 4 Jan 2022 09:04:30 +0900, Akira Yokosawa wrote:  
> >>>>> Hi,
> >>>>>
> >>>>> On Mon, 03 Jan 2022 15:46:30 -0700, Jonathan Corbet <corbet@lwn.net> wrote:    
> >>>>>> Mauro Carvalho Chehab <mchehab@kernel.org> writes:
> >>>>>>    
> >>>>>>> After a change meant to fix support for oriental characters
> >>>>>>> (Chinese, Japanese, Korean), ctex stylesheet is now a requirement
> >>>>>>> for PDF output.    
> >>>>>
> >>>>> FWIW, ctexhook.sty is a new requirement of xeCJK.sty v3.8.7 released
> >>>>> in June 2021.
> >>>>>
> >>>>>         Thanks, Akira
> >>>>>     
> >>>>>>>
> >>>>>>> Reported-by: Christoph Hellwig <hch@lst.de>
> >>>>>>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> >>>>>>> ---
> >>>>>>>
> >>>>>>> See [PATCH 0/1] at: https://lore.kernel.org/all/cover.1641243581.git.mchehab@kernel.org/
> >>>>>>>
> >>>>>>>  scripts/sphinx-pre-install | 1 +
> >>>>>>>  1 file changed, 1 insertion(+)
> >>>>>>>
> >>>>>>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> >>>>>>> index 288e86a9d1e5..46aaab414098 100755
> >>>>>>> --- a/scripts/sphinx-pre-install
> >>>>>>> +++ b/scripts/sphinx-pre-install
> >>>>>>> @@ -78,6 +78,7 @@ my %texlive = (
> >>>>>>>  	'ucs.sty'            => 'texlive-ucs',
> >>>>>>>  	'upquote.sty'        => 'texlive-upquote',
> >>>>>>>  	'wrapfig.sty'        => 'texlive-wrapfig',
> >>>>>>> +	'ctexhook.sty'       => 'texlive-ctex',
> >>>>>>>  );    
> >>>>>>    
> >>>>
> >>>> I'm afraid this update of the list for Fedora/openSUSE won't help
> >>>> Debian Stable (bullseye) users.
> >>>>
> >>>> ctexhook.sty is in texlive-lang-chinese on Debian/Ubuntu.  
> >>>
> >>> On such case, it is needed to map it for Debian/Ubuntu.
> >>> Could you please test the enclosed patch, applied on the top
> >>> of the previous one?  
> >>
> >> Looks like we need an additional hunk.  See below.
> >>
> >>         Thanks, Akira
> >>
> >>>
> >>> Thanks!
> >>> Mauro
> >>>
> >>> -
> >>>
> >>> [PATCH] scripts: sphinx-pre-install: Fix ctex support on Debian
> >>>
> >>> The name of the package with ctexhook.sty is different on
> >>> Debian/Ubuntu.
> >>>
> >>> Reported-by: Akira Yokosawa <akiyks@gmail.com>
> >>> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> >>>
> >>> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> >>> index 46aaab414098..ea96d18ee946 100755
> >>> --- a/scripts/sphinx-pre-install
> >>> +++ b/scripts/sphinx-pre-install
> >>> @@ -367,6 +367,7 @@ sub give_debian_hints()
> >>>  		"Pod::Usage"		=> "perl-modules",
> >>>  		"xelatex"		=> "texlive-xetex",
> >>>  		"rsvg-convert"		=> "librsvg2-bin",
> >>> +		"texlive-ctex"		=> "texlive-lang-chinese",
> >>>  	);
> >>>  
> >>>  	if ($pdf) {
> >>>   
> >> @@ -380,6 +381,7 @@ sub give_debian_hints()
> >>         }
> >>  
> >>         check_program("dvipng", 2) if ($pdf);
> >> +       check_missing_tex(2) if ($pdf);
> >>         check_missing(\%map);
> >>  
> >>         return if (!$need && !$optional);
> >>
> > 
> > This would be more complex than that, and per-distro tests are
> > required, in order to avoid the script to fail on other
> > distros.
> 
> Thank you for looking into this!
> I must admit I'm far from grasping how this perl script works...
> 
> > 
> > Something like the following (possibly incomplete) patch.
> 
> I'll test it under various distros/setups.
> It may take a while.

Did a quick test here with this lxc container:

	$ OS=debian REL=bullseye ;lxc-create -n ${OS} -t /usr/share/lxc/templates/lxc-download -- --dist ${OS} --release ${REL} --arch amd64

If we add check_missing_tex(), it will then complain about lots
of packages that don't exist in Debian (se logs at the end).

That's one of the biggest issue with texlive: each distro splits it on
different ways. So, basically, the %texlive hash at the script is meant
to the way Fedora and openSuse distros usually map packages. I would
expect that Mageia would also be similar if not identical, but other
distros map packages on different ways.

I'll prepare another patch for fixing the debian issue.

Regards,
Mauro

---

mchehab@debian:~/docs$ make pdfdocs
Documentation/Makefile:41: The 'sphinx-build' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the 'sphinx-build' executable.

Detected OS: Debian GNU/Linux 11.
Warning: better to also install "convert".
Warning: better to also install "dot".
Warning: better to also install "dvipng".
Warning: better to also install "fonts-dejavu".
Warning: better to also install "fonts-noto-cjk".
ERROR: please install "gcc", otherwise, build won't work.
Warning: better to also install "latexmk".
ERROR: please install "python", otherwise, build won't work.
Warning: better to also install "rsvg-convert".
Warning: better to also install "texlive-amscls".
Warning: better to also install "texlive-amsfonts".
Warning: better to also install "texlive-amsmath".
Warning: better to also install "texlive-anyfontsize".
Warning: better to also install "texlive-capt-of".
Warning: better to also install "texlive-cmap".
Warning: better to also install "texlive-ctex".
Warning: better to also install "texlive-ec".
Warning: better to also install "texlive-eqparbox".
Warning: better to also install "texlive-euenc".
Warning: better to also install "texlive-fancybox".
Warning: better to also install "texlive-fancyvrb".
Warning: better to also install "texlive-float".
Warning: better to also install "texlive-fncychap".
Warning: better to also install "texlive-framed".
Warning: better to also install "texlive-luatex85".
Warning: better to also install "texlive-mdwtools".
Warning: better to also install "texlive-multirow".
Warning: better to also install "texlive-needspace".
Warning: better to also install "texlive-oberdiek".
Warning: better to also install "texlive-parskip".
Warning: better to also install "texlive-polyglossia".
Warning: better to also install "texlive-psnfss".
Warning: better to also install "texlive-tabulary".
Warning: better to also install "texlive-threeparttable".
Warning: better to also install "texlive-titlesec".
Warning: better to also install "texlive-tools".
Warning: better to also install "texlive-ucs".
Warning: better to also install "texlive-upquote".
Warning: better to also install "texlive-wrapfig".
Warning: better to also install "xelatex".
You should run:

	sudo apt-get install imagemagick graphviz dvipng fonts-dejavu fonts-noto-cjk gcc latexmk python librsvg2-bin texlive-amscls texlive-amsfonts texlive-amsmath texlive-anyfontsize texlive-capt-of texlive-cmap texlive-lang-chinese texlive-ec texlive-eqparbox texlive-euenc texlive-fancybox texlive-fancyvrb texlive-float texlive-fncychap texlive-framed texlive-luatex85 texlive-mdwtools texlive-multirow texlive-needspace texlive-oberdiek texlive-parskip texlive-polyglossia texlive-psnfss texlive-tabulary texlive-threeparttable texlive-titlesec texlive-tools texlive-ucs texlive-upquote texlive-wrapfig texlive-xetex
Can't build as 2 mandatory dependencies are missing at ./scripts/sphinx-pre-install line 943.
Documentation/Makefile:41: The 'sphinx-build' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the 'sphinx-build' executable.

Detected OS: Debian GNU/Linux 11.
Warning: better to also install "convert".
Warning: better to also install "dot".
Warning: better to also install "dvipng".
Warning: better to also install "fonts-dejavu".
Warning: better to also install "fonts-noto-cjk".
ERROR: please install "gcc", otherwise, build won't work.
Warning: better to also install "latexmk".
ERROR: please install "python", otherwise, build won't work.
Warning: better to also install "rsvg-convert".
Warning: better to also install "texlive-amscls".
Warning: better to also install "texlive-amsfonts".
Warning: better to also install "texlive-amsmath".
Warning: better to also install "texlive-anyfontsize".
Warning: better to also install "texlive-capt-of".
Warning: better to also install "texlive-cmap".
Warning: better to also install "texlive-ctex".
Warning: better to also install "texlive-ec".
Warning: better to also install "texlive-eqparbox".
Warning: better to also install "texlive-euenc".
Warning: better to also install "texlive-fancybox".
Warning: better to also install "texlive-fancyvrb".
Warning: better to also install "texlive-float".
Warning: better to also install "texlive-fncychap".
Warning: better to also install "texlive-framed".
Warning: better to also install "texlive-luatex85".
Warning: better to also install "texlive-mdwtools".
Warning: better to also install "texlive-multirow".
Warning: better to also install "texlive-needspace".
Warning: better to also install "texlive-oberdiek".
Warning: better to also install "texlive-parskip".
Warning: better to also install "texlive-polyglossia".
Warning: better to also install "texlive-psnfss".
Warning: better to also install "texlive-tabulary".
Warning: better to also install "texlive-threeparttable".
Warning: better to also install "texlive-titlesec".
Warning: better to also install "texlive-tools".
Warning: better to also install "texlive-ucs".
Warning: better to also install "texlive-upquote".
Warning: better to also install "texlive-wrapfig".
Warning: better to also install "xelatex".
You should run:

	sudo apt-get install imagemagick graphviz dvipng fonts-dejavu fonts-noto-cjk gcc latexmk python librsvg2-bin texlive-amscls texlive-amsfonts texlive-amsmath texlive-anyfontsize texlive-capt-of texlive-cmap texlive-lang-chinese texlive-ec texlive-eqparbox texlive-euenc texlive-fancybox texlive-fancyvrb texlive-float texlive-fncychap texlive-framed texlive-luatex85 texlive-mdwtools texlive-multirow texlive-needspace texlive-oberdiek texlive-parskip texlive-polyglossia texlive-psnfss texlive-tabulary texlive-threeparttable texlive-titlesec texlive-tools texlive-ucs texlive-upquote texlive-wrapfig texlive-xetex
Can't build as 2 mandatory dependencies are missing at ./scripts/sphinx-pre-install line 943.
make[1]: *** [Documentation/Makefile:43: pdfdocs] Error 2
make: *** [Makefile:1772: pdfdocs] Error 2
mchehab@debian:~/docs$ sudo apt-get install imagemagick graphviz dvipng fonts-dejavu fonts-noto-cjk gcc latexmk python librsvg2-bin texlive-amscls texlive-amsfonts texlive-amsmath texlive-anyfontsize texlive-capt-of texlive-cmap texlive-lang-chinese texlive-ec texlive-eqparbox texlive-euenc texlive-fancybox texlive-fancyvrb texlive-float texlive-fncychap texlive-framed texlive-luatex85 texlive-mdwtools texlive-multirow texlive-needspace texlive-oberdiek texlive-parskip texlive-polyglossia texlive-psnfss texlive-tabulary texlive-threeparttable texlive-titlesec texlive-tools texlive-ucs texlive-upquote texlive-wrapfig texlive-xetex
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'python-is-python2' instead of 'python'
E: Unable to locate package texlive-amscls
E: Unable to locate package texlive-amsfonts
E: Unable to locate package texlive-amsmath
E: Unable to locate package texlive-anyfontsize
E: Unable to locate package texlive-capt-of
E: Unable to locate package texlive-cmap
E: Unable to locate package texlive-ec
E: Unable to locate package texlive-eqparbox
E: Unable to locate package texlive-euenc
E: Unable to locate package texlive-fancybox
E: Unable to locate package texlive-fancyvrb
E: Unable to locate package texlive-float
E: Unable to locate package texlive-fncychap
E: Unable to locate package texlive-framed
E: Unable to locate package texlive-luatex85
E: Unable to locate package texlive-mdwtools
E: Unable to locate package texlive-multirow
E: Unable to locate package texlive-needspace
E: Unable to locate package texlive-oberdiek
E: Unable to locate package texlive-parskip
E: Unable to locate package texlive-polyglossia
E: Unable to locate package texlive-psnfss
E: Unable to locate package texlive-tabulary
E: Unable to locate package texlive-threeparttable
E: Unable to locate package texlive-titlesec
E: Unable to locate package texlive-tools
E: Unable to locate package texlive-ucs
E: Unable to locate package texlive-upquote
E: Unable to locate package texlive-wrapfig

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-05 21:42                         ` Mauro Carvalho Chehab
@ 2022-01-05 22:57                           ` Akira Yokosawa
  2022-01-06  0:41                             ` [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian Mauro Carvalho Chehab
  2022-01-06  0:42                             ` [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency Mauro Carvalho Chehab
  0 siblings, 2 replies; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-05 22:57 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: hch, linux-doc, linux-kernel, corbet

On Wed, 5 Jan 2022 22:42:30 +0100, Mauro Carvalho Chehab wrote:
> Em Wed, 5 Jan 2022 21:09:59 +0900
> Akira Yokosawa <akiyks@gmail.com> escreveu:
> 
[...]
>>
>> I'll test it under various distros/setups.
>> It may take a while.
> 
> Did a quick test here with this lxc container:
> 
> 	$ OS=debian REL=bullseye ;lxc-create -n ${OS} -t /usr/share/lxc/templates/lxc-download -- --dist ${OS} --release ${REL} --arch amd64
> 
> If we add check_missing_tex(), it will then complain about lots
> of packages that don't exist in Debian (se logs at the end).

Now I think I understand what kind of tests we need.

My plan was to intentionally uninstall texlive-ctex (or whichever
package contains ctexhook.sty) and see if the lack of ctexhook.sty
is detected or not.

Apparently, such a test would mean little for sphinx_pre_install.

> 
> That's one of the biggest issue with texlive: each distro splits it on
> different ways. So, basically, the %texlive hash at the script is meant
> to the way Fedora and openSuse distros usually map packages. I would
> expect that Mageia would also be similar if not identical, but other
> distros map packages on different ways.
> 
> I'll prepare another patch for fixing the debian issue.

Then I'll wait for it.

        Thanks, Akira

> 
> Regards,
> Mauro
> 
> ---
> 
> mchehab@debian:~/docs$ make pdfdocs
> Documentation/Makefile:41: The 'sphinx-build' command was not found. Make sure you have Sphinx installed and in PATH, or set the SPHINXBUILD make variable to point to the full path of the 'sphinx-build' executable.
> 
> Detected OS: Debian GNU/Linux 11.
> Warning: better to also install "convert".
> Warning: better to also install "dot".
> Warning: better to also install "dvipng".
> Warning: better to also install "fonts-dejavu".
> Warning: better to also install "fonts-noto-cjk".
> ERROR: please install "gcc", otherwise, build won't work.
> Warning: better to also install "latexmk".
> ERROR: please install "python", otherwise, build won't work.
> Warning: better to also install "rsvg-convert".
> Warning: better to also install "texlive-amscls".
> Warning: better to also install "texlive-amsfonts".
> Warning: better to also install "texlive-amsmath".
> Warning: better to also install "texlive-anyfontsize".
> Warning: better to also install "texlive-capt-of".
> Warning: better to also install "texlive-cmap".
> Warning: better to also install "texlive-ctex".
[...]


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian
  2022-01-05 22:57                           ` Akira Yokosawa
@ 2022-01-06  0:41                             ` Mauro Carvalho Chehab
  2022-01-06  2:00                               ` Akira Yokosawa
  2022-01-06 22:35                               ` Jonathan Corbet
  2022-01-06  0:42                             ` [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency Mauro Carvalho Chehab
  1 sibling, 2 replies; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-06  0:41 UTC (permalink / raw)
  To: Linux Doc Mailing List, Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Akira Yokosawa, linux-kernel

The name of the package with ctexhook.sty is different on
Debian/Ubuntu.

Reported-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 scripts/sphinx-pre-install | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 46aaab414098..f126ecbb0494 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -370,6 +370,9 @@ sub give_debian_hints()
 	);
 
 	if ($pdf) {
+		check_missing_file(["/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty"],
+				   "texlive-lang-chinese", 2);
+
 		check_missing_file(["/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"],
 				   "fonts-dejavu", 2);
 
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency
  2022-01-05 22:57                           ` Akira Yokosawa
  2022-01-06  0:41                             ` [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian Mauro Carvalho Chehab
@ 2022-01-06  0:42                             ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-06  0:42 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: hch, linux-doc, linux-kernel, corbet

Em Thu, 6 Jan 2022 07:57:22 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:

> On Wed, 5 Jan 2022 22:42:30 +0100, Mauro Carvalho Chehab wrote:
> > Em Wed, 5 Jan 2022 21:09:59 +0900
> > Akira Yokosawa <akiyks@gmail.com> escreveu:
> >   
> [...]
> >>
> >> I'll test it under various distros/setups.
> >> It may take a while.  
> > 
> > Did a quick test here with this lxc container:
> > 
> > 	$ OS=debian REL=bullseye ;lxc-create -n ${OS} -t /usr/share/lxc/templates/lxc-download -- --dist ${OS} --release ${REL} --arch amd64
> > 
> > If we add check_missing_tex(), it will then complain about lots
> > of packages that don't exist in Debian (se logs at the end).  
> 
> Now I think I understand what kind of tests we need.
> 
> My plan was to intentionally uninstall texlive-ctex (or whichever
> package contains ctexhook.sty) and see if the lack of ctexhook.sty
> is detected or not.
> 
> Apparently, such a test would mean little for sphinx_pre_install.

Yes. The best way is to use lxc (or something similar) to install
a minimal container, install git (and make) and then run the script
directly or via "make pdfdocs".

This way, the script will test all dependencies. 

It should be noticed that, on a minimal install like that, the script
will first report the basic dependencies, which, once installed, may
require other ones.

For instance, in order for the script to detect that python3-venv
is needed, the python package would need to be installed.

On Debian with the above container, I had to run it 2 times.

First run:
	$ make pdfdocs
	...
	You should run:

		sudo apt-get install imagemagick graphviz dvipng fonts-dejavu fonts-noto-cjk gcc latexmk python librsvg2-bin texlive-lang-chinese texlive-xetex

Second run:
	$ make pdfdocs
	...
	You should run:

		sudo apt-get install python3-venv
	note: If you want pdf, you need at least Sphinx 2.4.4.
	To upgrade Sphinx, use:

		/usr/bin/python3 -m venv sphinx_2.4.4
		. sphinx_2.4.4/bin/activate
		pip install -r ./Documentation/sphinx/requirements.txt

> > That's one of the biggest issue with texlive: each distro splits it on
> > different ways. So, basically, the %texlive hash at the script is meant
> > to the way Fedora and openSuse distros usually map packages. I would
> > expect that Mageia would also be similar if not identical, but other
> > distros map packages on different ways.
> > 
> > I'll prepare another patch for fixing the debian issue.  
> 
> Then I'll wait for it.

Patch for Debian sent.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian
  2022-01-06  0:41                             ` [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian Mauro Carvalho Chehab
@ 2022-01-06  2:00                               ` Akira Yokosawa
       [not found]                                 ` <20220106043707.0d40cd11@coco.lan>
  2022-01-06 22:35                               ` Jonathan Corbet
  1 sibling, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-06  2:00 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-kernel, Jonathan Corbet, Linux Doc Mailing List, Akira Yokosawa

On Thu,  6 Jan 2022 01:41:02 +0100, Mauro Carvalho Chehab wrote:
> The name of the package with ctexhook.sty is different on
> Debian/Ubuntu.
> 
> Reported-by: Akira Yokosawa <akiyks@gmail.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

Tested-by: Akira Yokosawa <akiyks@gmail.com>

> ---
>  scripts/sphinx-pre-install | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index 46aaab414098..f126ecbb0494 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -370,6 +370,9 @@ sub give_debian_hints()
>  	);
>  
>  	if ($pdf) {
> +		check_missing_file(["/usr/share/texlive/texmf-dist/tex/latex/ctex/ctexhook.sty"],
> +				   "texlive-lang-chinese", 2);
> +
>  		check_missing_file(["/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"],
>  				   "fonts-dejavu", 2);
>  
> -- 
> 2.33.1

So are you planing to add similar checks incrementally for the
other distros ?

There are two things I'd like to mention.

First, on Debian buster, Ubuntu Bionic, and Ubuntu Focal,
xeCJK.sty are younger then v3.8.3 and ctexhook.sty is not necessary.
As texlive-lang-chinese is a fairly large package, it would be better
not to require the unnecessary package.

The new dependency can be checked by:

    $ grep ctex `kpsewhich xeCJK.sty`

If there is no hit, no need of ctexhook.sty.

It would be nice if the check can be made conditional.
But it would not be possible to check before you have xeCJK.sty
on your system.

Hmm??

Second, on CentOS stream8, texlive-ctex is not available.
Following is the error from "dnf install":

    $ sudo dnf install texlive-ctex
    Last metadata expiration check: 0:00:35 ago on Thu Jan  6 01:43:50 2022.
    No match for argument: texlive-ctex
    Error: Unable to find a match: texlive-ctex

xeCJK.sty there is also younger then v3.8.3.

So again, if the check of ctexhook.sty could be made conditional,
we would be able to list CentOS stream8 (or RHEL 8) as capable
of "make pdfdocs".

Longer term (for CentOS stream9 or RHEL 9), we might need to ask
EPEL maintainers to add texlive-ctex.

Thoughts?

List of xeCJK.sty version:

    Debian buster   v3.7.1
    Ubuntu Bionic   v3.6.1
    Ubuntu Focal    v3.8.1
    CentOS stream8  v3.5.0

        Thanks, Akira

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian
  2022-01-06  0:41                             ` [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian Mauro Carvalho Chehab
  2022-01-06  2:00                               ` Akira Yokosawa
@ 2022-01-06 22:35                               ` Jonathan Corbet
  1 sibling, 0 replies; 37+ messages in thread
From: Jonathan Corbet @ 2022-01-06 22:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, Akira Yokosawa, linux-kernel

Mauro Carvalho Chehab <mchehab@kernel.org> writes:

> The name of the package with ctexhook.sty is different on
> Debian/Ubuntu.
>
> Reported-by: Akira Yokosawa <akiyks@gmail.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
>  scripts/sphinx-pre-install | 3 +++
>  1 file changed, 3 insertions(+)

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian
       [not found]                                 ` <20220106043707.0d40cd11@coco.lan>
@ 2022-01-09  4:09                                   ` Akira Yokosawa
  2022-01-09  6:28                                     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-09  4:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-doc, Jonathan Corbet, Akira Yokosawa

Hi Maruo,
(+Cc: Jon, linux-doc)

On Thu, 6 Jan 2022 04:37:07 +0100, Mauro Carvalho Chehab wrote:
> Em Thu, 6 Jan 2022 11:00:08 +0900
> Akira Yokosawa <akiyks@gmail.com> escreveu:
[...]
>> Longer term (for CentOS stream9 or RHEL 9), we might need to ask
>> EPEL maintainers to add texlive-ctex.
> 
> Longer term, the script is actually fixing a broken dependency issue
> on distros. So, bugzillas for Fedora/Debian & derivated ones should be 
> opened for "texlive-xecjk" package to also select "texlive-ctex"
> (or whatever other name those packages have on distros).

FWIW, I asked Karl Berry, who is the chief maintainer of upstream
TeX Live, to add a dependency on ctex to xecjk [1].

[1]: https://tug.org/pipermail/tex-live/2022-January/047648.html

Karl has added the dependency to xecjk as of rev 61529 [2].

[2]: https://tug.org/pipermail/tex-live/2022-January/047654.html

On up-to-date vanilla TeX Live 2021 (>= rev61529):

    $ tlmgr info --data depends xecjk
    ctex

With xecjk < rev61529

    $ tlmgr info --data depends xecjk
    (no output)

This dependency is expected to be reflected in the TeX Live
packaging for next Fedora release.  OTOH, as I mentioned earlier,
EPEL 9 (for CentOS stream9) doesn't have texlive-ctex at the
moment, so we need to see what happens there when RHEL 9 is ready.

Note: the xecjk -> ctex dependency is already taken care of
by openSUSE's TeX Live packages.   

As for Ubuntu/Debian, it looks like TeX Live/Debian packaging
maintainer, Norbert Preining, has no intention of adding
dependency of texlive-xetex -> texlive-lang-chinese as can be
seen in his responses to a Debian Bug report [3].
I think this is a reasonable choice as most xetex users don't
use xecjk and texlive-lang-chinese is large in size.

[3]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961703

        Thanks, Akira

> 
> Worth mentioning that the script dependency-checking is should be smart
> enough to not break once texlive distro maintainers fix such issues.
> 
> Thanks,
> Mauro
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian
  2022-01-09  4:09                                   ` Akira Yokosawa
@ 2022-01-09  6:28                                     ` Mauro Carvalho Chehab
  2022-01-09  7:48                                       ` Akira Yokosawa
  0 siblings, 1 reply; 37+ messages in thread
From: Mauro Carvalho Chehab @ 2022-01-09  6:28 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: linux-doc, Jonathan Corbet

Em Sun, 9 Jan 2022 13:09:19 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:

> Hi Maruo,
> (+Cc: Jon, linux-doc)
> 
> On Thu, 6 Jan 2022 04:37:07 +0100, Mauro Carvalho Chehab wrote:
> > Em Thu, 6 Jan 2022 11:00:08 +0900
> > Akira Yokosawa <akiyks@gmail.com> escreveu:  
> [...]
> >> Longer term (for CentOS stream9 or RHEL 9), we might need to ask
> >> EPEL maintainers to add texlive-ctex.  
> > 
> > Longer term, the script is actually fixing a broken dependency issue
> > on distros. So, bugzillas for Fedora/Debian & derivated ones should be 
> > opened for "texlive-xecjk" package to also select "texlive-ctex"
> > (or whatever other name those packages have on distros).  
> 
> FWIW, I asked Karl Berry, who is the chief maintainer of upstream
> TeX Live, to add a dependency on ctex to xecjk [1].

Thanks for forwarding this question to him and to address it on distros!

> 
> [1]: https://tug.org/pipermail/tex-live/2022-January/047648.html
> 
> Karl has added the dependency to xecjk as of rev 61529 [2].
> 
> [2]: https://tug.org/pipermail/tex-live/2022-January/047654.html
> 
> On up-to-date vanilla TeX Live 2021 (>= rev61529):
> 
>     $ tlmgr info --data depends xecjk
>     ctex
> 
> With xecjk < rev61529
> 
>     $ tlmgr info --data depends xecjk
>     (no output)

Nice! Yeah, this is the long term solution, but still won't prevent
people/distros based on older packages to keep using packages
without such requirements.

> This dependency is expected to be reflected in the TeX Live
> packaging for next Fedora release.

Yeah, Fedora is usually keen to changes.

> OTOH, as I mentioned earlier,
> EPEL 9 (for CentOS stream9) doesn't have texlive-ctex at the
> moment, so we need to see what happens there when RHEL 9 is ready.

Yes. RHEL/EPEL is usually a lot more conservative.

> Note: the xecjk -> ctex dependency is already taken care of
> by openSUSE's TeX Live packages.   

On both Tumbleweed and on Leap?

> As for Ubuntu/Debian, it looks like TeX Live/Debian packaging
> maintainer, Norbert Preining, has no intention of adding
> dependency of texlive-xetex -> texlive-lang-chinese as can be
> seen in his responses to a Debian Bug report [3].
> I think this is a reasonable choice as most xetex users don't
> use xecjk and texlive-lang-chinese is large in size.
> 
> [3]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961703

Debian package maintainer could reconsider it after the upstream
dependency addition, but probably only for SID and yet-to-be-released
versions. Debian is very conservative on their releases. 
Even if SID gains such dependency fix, I would be surprised 
if they end porting a dependency change like that to Bullseye
(which should be the latest version for ~1.5 years - with LTS
extending it for ~3.5 years).

It sounds worth mentioning about the texlive dependency decision at
the Debian bug.

>         Thanks, Akira
> 
> > 
> > Worth mentioning that the script dependency-checking is should be smart
> > enough to not break once texlive distro maintainers fix such issues.
> > 
> > Thanks,
> > Mauro
> >   

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian
  2022-01-09  6:28                                     ` Mauro Carvalho Chehab
@ 2022-01-09  7:48                                       ` Akira Yokosawa
  0 siblings, 0 replies; 37+ messages in thread
From: Akira Yokosawa @ 2022-01-09  7:48 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-doc, Jonathan Corbet

On Sun, 9 Jan 2022 07:28:51 +0100, Mauro Carvalho Chehab wrote:
> Em Sun, 9 Jan 2022 13:09:19 +0900
> Akira Yokosawa <akiyks@gmail.com> escreveu:
> 
>> Hi Maruo,
>> (+Cc: Jon, linux-doc)
>>
>> On Thu, 6 Jan 2022 04:37:07 +0100, Mauro Carvalho Chehab wrote:
>>> Em Thu, 6 Jan 2022 11:00:08 +0900
>>> Akira Yokosawa <akiyks@gmail.com> escreveu:  
>> [...]
>>>> Longer term (for CentOS stream9 or RHEL 9), we might need to ask
>>>> EPEL maintainers to add texlive-ctex.  
>>>
>>> Longer term, the script is actually fixing a broken dependency issue
>>> on distros. So, bugzillas for Fedora/Debian & derivated ones should be 
>>> opened for "texlive-xecjk" package to also select "texlive-ctex"
>>> (or whatever other name those packages have on distros).  
>>
>> FWIW, I asked Karl Berry, who is the chief maintainer of upstream
>> TeX Live, to add a dependency on ctex to xecjk [1].
> 
> Thanks for forwarding this question to him and to address it on distros!
> 
>>
>> [1]: https://tug.org/pipermail/tex-live/2022-January/047648.html
>>
>> Karl has added the dependency to xecjk as of rev 61529 [2].
>>
>> [2]: https://tug.org/pipermail/tex-live/2022-January/047654.html
>>
>> On up-to-date vanilla TeX Live 2021 (>= rev61529):
>>
>>     $ tlmgr info --data depends xecjk
>>     ctex
>>
>> With xecjk < rev61529
>>
>>     $ tlmgr info --data depends xecjk
>>     (no output)
> 
> Nice! Yeah, this is the long term solution, but still won't prevent
> people/distros based on older packages to keep using packages
> without such requirements.
> 
>> This dependency is expected to be reflected in the TeX Live
>> packaging for next Fedora release.
> 
> Yeah, Fedora is usually keen to changes.
> 
>> OTOH, as I mentioned earlier,
>> EPEL 9 (for CentOS stream9) doesn't have texlive-ctex at the
>> moment, so we need to see what happens there when RHEL 9 is ready.
> 
> Yes. RHEL/EPEL is usually a lot more conservative.
> 
>> Note: the xecjk -> ctex dependency is already taken care of
>> by openSUSE's TeX Live packages.   
> 
> On both Tumbleweed and on Leap?

I mean on Tumbleweed only.
Leap's xecjk is v3.4.8 and has no dependency on ctex.

> 
>> As for Ubuntu/Debian, it looks like TeX Live/Debian packaging
>> maintainer, Norbert Preining, has no intention of adding
>> dependency of texlive-xetex -> texlive-lang-chinese as can be
>> seen in his responses to a Debian Bug report [3].
>> I think this is a reasonable choice as most xetex users don't
>> use xecjk and texlive-lang-chinese is large in size.
>>
>> [3]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961703
> 
> Debian package maintainer could reconsider it after the upstream
> dependency addition, but probably only for SID and yet-to-be-released
> versions.
>           Debian is very conservative on their releases. 
> Even if SID gains such dependency fix, I would be surprised 
> if they end porting a dependency change like that to Bullseye
> (which should be the latest version for ~1.5 years - with LTS
> extending it for ~3.5 years).
> 
> It sounds worth mentioning about the texlive dependency decision at
> the Debian bug.

I'm afraid I don't think so.
At Debian Latex wiki [3], they say:

  If you want to add support for your language (other than english) in
  TeX Live, search for texlive-lang [4] and install your language.

[3]: https://wiki.debian.org/Latex
[4]: https://packages.debian.org/search?keywords=texlive-lang

This is the Debian's policy of TeX Live packaging.
I wouldn't complain if they say "Just install both of texlive-xetex
and texlive-lang-chinese if you want xecjk to work."

There are a lot of inter-collection dependencies in upstream TeX
Live, but many of then are ignored in TeX Live/Debian packages.
For example, ctex has a dependency on xecjk (reverse of the newly
added one) in upstream, but Debian's texlive-lang-chinese does not
depend on texlive-xetex.

        Thanks, Akira

> 
>>         Thanks, Akira
>>
>>>
>>> Worth mentioning that the script dependency-checking is should be smart
>>> enough to not break once texlive distro maintainers fix such issues.
>>>
>>> Thanks,
>>> Mauro
>>>   

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2022-01-09  7:48 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 16:30 make pdfdocs fails on Debian stable Christoph Hellwig
2022-01-03 16:58 ` Mauro Carvalho Chehab
2022-01-03 17:11   ` Christoph Hellwig
2022-01-03 20:58     ` Mauro Carvalho Chehab
2022-01-03 21:01       ` [PATCH 0/1] Detect the need of texlive-ctex Mauro Carvalho Chehab
2022-01-03 21:01         ` [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency Mauro Carvalho Chehab
2022-01-03 22:46           ` Jonathan Corbet
2022-01-04  0:04             ` Akira Yokosawa
2022-01-04  1:54               ` Akira Yokosawa
2022-01-04  8:05                 ` Mauro Carvalho Chehab
2022-01-04 10:26                   ` Akira Yokosawa
2022-01-05  7:48                     ` Mauro Carvalho Chehab
2022-01-05 12:09                       ` Akira Yokosawa
2022-01-05 21:42                         ` Mauro Carvalho Chehab
2022-01-05 22:57                           ` Akira Yokosawa
2022-01-06  0:41                             ` [PATCH v2] scripts: sphinx-pre-install: Fix ctex support on Debian Mauro Carvalho Chehab
2022-01-06  2:00                               ` Akira Yokosawa
     [not found]                                 ` <20220106043707.0d40cd11@coco.lan>
2022-01-09  4:09                                   ` Akira Yokosawa
2022-01-09  6:28                                     ` Mauro Carvalho Chehab
2022-01-09  7:48                                       ` Akira Yokosawa
2022-01-06 22:35                               ` Jonathan Corbet
2022-01-06  0:42                             ` [PATCH 1/1] scripts: sphinx-pre-install: add required ctex dependency Mauro Carvalho Chehab
2022-01-04  2:00               ` Akira Yokosawa
2022-01-04  6:47       ` make pdfdocs fails on Debian stable Christoph Hellwig
2022-01-04  7:32         ` Akira Yokosawa
2022-01-04  7:36           ` Christoph Hellwig
2022-01-04  7:53             ` Akira Yokosawa
2022-01-04  7:56               ` Christoph Hellwig
2022-01-04  8:07                 ` Akira Yokosawa
2022-01-04  8:16                   ` Christoph Hellwig
2022-01-04  8:44                     ` Akira Yokosawa
2022-01-04  9:31             ` Akira Yokosawa
2022-01-04 13:19               ` Christoph Hellwig
2022-01-04 13:46                 ` Akira Yokosawa
2022-01-05  1:47                   ` Akira Yokosawa
2022-01-05  7:35                     ` Christoph Hellwig
2022-01-05 12:03                       ` Akira Yokosawa

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.