Bug#1064593: debian-policy: missing static resources for www.debian.org policy page

2024-03-03 Thread Holger Wansing
Hi,

Stéphane Blondon  wrote (Tue, 27 Feb 2024 21:27:50 
+0100):
> Hello,
> 
> Le dim. 25 févr. 2024 à 14:24, Holger Wansing  a écrit :
> >
> > Hi,
> > Seems there is more than only one issue:
> >
> > 1.
> > In the binary package (debian-policy latest version) the above files and
> > directories are existing, but the files are all empty (0 B size).
> > However, in the previous version (4.6.2.0) the javascript .js files
> > are also empty (0 B), so that's most probably not the issue.
> > [...]
> > In a local build here, they are all fine, and the document is displayed
> > correctly. But that's build on bookworm, so sphinx version 5.3.0.
> > The binary packages built by buildd will get build on sphinx 7.2.x
> > I think, so maybe there is the difference?
> > Maybe we need some adaption for latest sphinx version?
> 
> 
> Sphinx Changelog (https://www.sphinx-doc.org/en/master/changes.html)
> shows several incompatibilities between 5.3 and 7 branches.
> Can we get the logs of the built of the package?
> 
> I will try to do some tests with Sphinx 7.2 in a virtualenv too.

I tested building it on a trixie system:
a build with just a 'make' in 'policy' dir is successful, the generated
html files are valid, with the new Debian theme.

So, no problem with latest Sphinx version, it seems the integration in the 
debian-policy package is the problem (aka debian/rules) ...


Holger



-- 
Holger Wansing 
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076



Bug#1064593: debian-policy: missing static resources for www.debian.org policy page

2024-03-03 Thread Stéphane Blondon
Hello,

Le dim. 3 mars 2024 à 11:49, Holger Wansing  a écrit :
> So, no problem with latest Sphinx version, it seems the integration in the
> debian-policy package is the problem (aka debian/rules) ...

Thank you for the search.

I have two wild guesses based on broken symlink assumption:

1. By dh_auto_install

buildd create symbolic links to the files (like theme.css) provided by
python3-sphinx-rtd-theme:
lrwxrwxrwx root/root 0 2024-02-24 12:39
./usr/share/doc/debian-policy/policy.html/_static/css/theme.css ->
../../../../../sphinx_rtd_theme/static/css/theme.css
(found in the log file)

Then the target dh_auto_install in debian/rules from debian_policy
moves files (line 15):
mv debian/tmp/* debian/debian-policy/

The symlink is relative so it could be broken.

2. By the webserver

In such case, the symlink is still correct after the install. However,
the target directory would be outside the static directories served by
the webserver. By default, they are not followed by the webserver to
avoid leaking data outside the static root directory.


Hope it helps,
Stéphane