All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/11] Fix PDF doc builds on major distros
Date: Sun, 17 Aug 2025 13:36:06 +0200	[thread overview]
Message-ID: <20250817133606.79d968ed@sal.lan> (raw)
In-Reply-To: <acc71988-4ed7-4df1-aa1f-a9d7a125ca53@gmail.com>

Em Sun, 17 Aug 2025 18:46:35 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:

> [-CC: bpf@vger]
> 
> On Sat, 16 Aug 2025 13:55:38 +0200, Mauro Carvalho Chehab wrote:
> > Em Sat, 16 Aug 2025 14:06:43 +0900
> > Akira Yokosawa <akiyks@gmail.com> escreveu:
> >   
> 
> [...]
> 
> > Works for me, but let's do it on a separate series. I still have more
> > than 100 patches on my pile to be merged. This series is focused on
> > making at least some PDFs to build where possible, addressing major
> > problems at conf.py that are causing LaTeX to not work on several
> > distros and to fix wrong package dependencies(*).
> > 
> > I'll add a TODO item on my queue to replace fom ImageMagick to
> > Inkscape on a separate series.
> > 
> > (*) One of such problem you blamed sphinx-build-wrapper, but 
> >     the issue is actually addressed on this series with fixes to conf.py: 
> >     there are currently several troubles at latex_documents list and at
> >     latex_elements.
> > 
> >     Those are causing wrong font detection on LaTeX.  
> 
> I couldn't see what you are talking about at first, because there
> have not been any such issues reported.

Heh, as you reported, you had troubles building pdf on Debian/Ubuntu. 
That's mainly why I took some time finding issues and writing this
series. Basically, just fixing ImageMagick permissions didn't fix
everything, as, at least with the Sphinx versions used at the tests
got troubles with Sphinx hyphernation, which required a Polish font.

Debian LaTeX packages seem to have issues with that. Fedora and
other rpm-based distros built it fine.

Now, reproducing such bugs could be tricky, specially with LaTeX,
which is a complex tool with lots of system-specific stuff.

Eventually, this could be related to LANG/LANGUAGE/LC_ALL/...
env vars. Here, I'm using lxc-attach to bind to the container.
It doesn't run .bashrc nor set locale vars, and it seems to keep
some env vars from the host. In the specific case of LANG,
it doesn't set anything. So, my test script sets LANG and LC_ALL
to "C". The host has it set to LANG=pt_BR.UTF-8.

> Also, after applying 1/11 ... 4/11 on top of current docs-next
> (commit 0bbc2548ea85 ("Merge branch 'pre-install' into docs-mw"),
> despite the changelog of 5/11 which claims to fix an issue under
> debian, I couldn't reproduce the "! Corrupted NFSS tables" error
> under Ubuntu 24.04 (noble).

Maybe you could try set LANG/LC_ALL to "C".

I tested it on the following lxc containers (picked from lxc
download repositories):

  # APT-based (Debian/Ubuntu-like)
  debian:
    release: "bookworm"
    pre_setup_cmds: *apt_pkg_cmd
    post_setup_cmds:
      - "systemctl enable ssh"
    pkg_cmd: *apt_pkg_cmd

  devuan:
    release: "daedalus"
    pkg_cmd: *apt_pkg_cmd

  kali:
    release: "current"
    pkg_cmd: *apt_pkg_cmd

  mint:
    release: "wilma"
    pkg_cmd: *apt_pkg_cmd

  ubuntu:
    release: "plucky"
    pkg_cmd: *apt_pkg_cmd

  ubuntu-lts:
    dist: "ubuntu"
    release: "noble"
    pkg_cmd: *apt_pkg_cmd

apt_pkg_cmd: &apt_pkg_cmd
  - "sudo locale-gen"
  - "sudo dpkg-reconfigure --frontend=noninteractive locales"
  - "apt-get update && apt-get install -y openssh-server git python3 make"
  - |
    if [ -f /etc/ImageMagick-6/policy.xml ]; then
      # Remove any existing restrictive policies for PDF/PS/EPS/XPS
      sed -i '/<policy.*domain="coder".*pattern=".*\(PDF\|PS\|EPS\|XPS\).*"/d' /etc/ImageMagick-6/policy.xml
      # Allow PDF patterns at the end </policymap>
      sed -i '/<\/policymap>/i \ \ <policy domain="coder" rights="read|write" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />' /etc/ImageMagick-6/policy.xml
    fi
  - |
    if [ -f /etc/ImageMagick-7/policy.xml ]; then
      # Remove any existing restrictive policies for PDF/PS/EPS/XPS
      sed -i '/<policy.*domain="coder".*pattern=".*\(PDF\|PS\|EPS\|XPS\).*"/d' /etc/ImageMagick-7/policy.xml
      # Allow PDF patterns at the end </policymap>
      sed -i '/<\/policymap>/i \ \ <policy domain="coder" rights="read|write" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />' /etc/ImageMagick-7/policy.xml
    fi

Packages are installed according using sphinx-pre-install
instructions.

I don't remember what of those got the corrupted tables LaTeX warning,
but I got it on more than one Debian-based distro. When I wrote the
fix, I guess I logged at the Debian container.

> I'm confused ...  How can I reproduce this?
> 
> It's getting really hard for me to keep up with your pace of changes
> in doc build scripts, really.
> 
> Akira

  reply	other threads:[~2025-08-17 11:36 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 11:36 [PATCH 00/11] Fix PDF doc builds on major distros Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 01/11] docs: Makefile: Fix LaTeX paper size settings Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 02/11] docs: conf.py: better handle latex documents Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 03/11] docs: conf.py: fix doc name with SPHINXDIRS Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 04/11] docs: conf.py: rename some vars at latex_documents logic Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 05/11] docs: conf.py: fix some troubles for LaTeX output Mauro Carvalho Chehab
2025-08-20  8:16   ` Akira Yokosawa
2025-10-02 16:30     ` ChaosEsque Team
2025-08-15 11:36 ` [PATCH 06/11] scripts: sphinx-pre-install: fix PDF build issues on Ubuntu Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 07/11] scripts: sphinx-pre-install: add missing gentoo pdf dependencies Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 08/11] scripts: sphinx-pre-install: fix PDF dependencies for openSuse Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 09/11] scripts: sphinx-pre-install: fix dependencies for OpenMandriva Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 10/11] scripts: sphinx-pre-install: fix pdf dependencies for Mageia 9 Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 11/11] scripts: sphinx-pre-install: fix PDF dependencies for gentoo Mauro Carvalho Chehab
2025-08-16  5:06 ` [PATCH 00/11] Fix PDF doc builds on major distros Akira Yokosawa
2025-08-16 11:55   ` Mauro Carvalho Chehab
2025-08-17  9:46     ` Akira Yokosawa
2025-08-17 11:36       ` Mauro Carvalho Chehab [this message]
2025-08-17 12:24         ` Akira Yokosawa
2025-08-17 13:45           ` Mauro Carvalho Chehab
2025-08-17 16:07             ` Akira Yokosawa
2025-08-18  0:44               ` Akira Yokosawa
2025-08-18  9:42                 ` Mauro Carvalho Chehab
2025-08-18 10:06                   ` Akira Yokosawa
2025-08-18 11:35                     ` Mauro Carvalho Chehab
2025-08-18 12:00                       ` Akira Yokosawa
2025-08-18 17:07               ` Jonathan Corbet
2025-08-18 23:26                 ` Akira Yokosawa
2025-08-19  1:02                   ` Mauro Carvalho Chehab
2025-08-19  2:16                     ` Akira Yokosawa
2025-08-19 13:32                       ` Mauro Carvalho Chehab
2025-08-19 23:54                         ` Akira Yokosawa
2025-08-20  7:15                           ` Mauro Carvalho Chehab
2025-08-20 11:41                             ` Akira Yokosawa
2025-08-20 16:48                               ` Mauro Carvalho Chehab
2025-08-20 23:53                                 ` Akira Yokosawa
2025-08-21  0:09                                   ` Akira Yokosawa
2025-08-21  7:52                                     ` Mauro Carvalho Chehab
2025-08-21  7:56                                       ` Mauro Carvalho Chehab
2025-08-21  9:12                                     ` Inkscape - Was: " Mauro Carvalho Chehab
2025-08-18 16:59       ` Jonathan Corbet
2025-08-17 15:32 ` Vegard Nossum
2025-08-18  8:33   ` Mauro Carvalho Chehab

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20250817133606.79d968ed@sal.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=akiyks@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

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

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