Bug#1064593: Bug#1066967: Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Hello, On Fri 22 Mar 2024 at 06:46pm +03, Dmitry Shachnev wrote: > Actually, I would move ${sphinxdoc:Depends} from Recommends to > Depends, because the documentation is mostly unusable without the > static files. I think it's in Recommends because we ship other formats that don't need it, and to ensure installability on stable, or something similar. -- Sean Whitton signature.asc Description: PGP signature
Bug#1064593: Bug#1066967: Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Hello, On Sat 23 Mar 2024 at 05:08pm +01, Holger Wansing wrote: > While working on adapting the parts/7doc script (from Debian Webmaster > Team's 'cron' repo), I realized that this is not going to work out of the > box: while the concept of the symlinks mentioned above is working fine, > when the debian-policy document is installed on a machine as usual > (means it recides in the same path as in the binary deb package, aka > /usr/share/doc/debian-policy/policy.html), we have the docs for the website > on the debian.org website machine in another path. That is in > /srv/www.debian.org/www/doc/debian-policy/. > > That means the (relative) symlinks will not resolve! > Therefore I think the best solution here is, to change the relative > symlinks into absolute ones, on the debian.org website machine. > > I have worked out the needed changes for cron/parts/7doc to deal with all > this (it works fine here locally). The debian-policy package could stay > unchanged. > I attach the patch here just for reference; will apply it, as soon as > sphinx-rtd-theme-common gets installed on wolkenstein > (working on a bugreport to DSA to get this done). > > Closing #1066967 against sphinx-common/dh_sphinxdoc now. > Thanks python people for your help! Many thanks all for working on this, especially you Holger for this scripting work. So, we're waiting in DSA and then on your script changes, and it'll work again. -- Sean Whitton signature.asc Description: PGP signature
Bug#1064593: Bug#1066967: Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Hi, Dmitry Shachnev wrote (Fri, 22 Mar 2024 18:46:25 +0300): > On Fri, Mar 22, 2024 at 03:30:55PM +0100, Holger Wansing wrote: > > Ok, I see. > > So, we will need to get sphinx-rtd-theme-common installed on all debian.org > > website mirrors, and it will just work (?) ... > > From your earlier message it seemed to me like you are using the build > tree in your deploy process, not the built package. > > That is why I suggested not running dh_sphinxdoc, however my suggestion > applied only to your deploy procedure. The package which is being uploaded > to Debian archive should still use dh_sphinxdoc. > > If you are using the built package and installing it on the remote server, > then yes, install sphinx-rtd-theme-common and you should be good. While working on adapting the parts/7doc script (from Debian Webmaster Team's 'cron' repo), I realized that this is not going to work out of the box: while the concept of the symlinks mentioned above is working fine, when the debian-policy document is installed on a machine as usual (means it recides in the same path as in the binary deb package, aka /usr/share/doc/debian-policy/policy.html), we have the docs for the website on the debian.org website machine in another path. That is in /srv/www.debian.org/www/doc/debian-policy/. That means the (relative) symlinks will not resolve! Therefore I think the best solution here is, to change the relative symlinks into absolute ones, on the debian.org website machine. I have worked out the needed changes for cron/parts/7doc to deal with all this (it works fine here locally). The debian-policy package could stay unchanged. I attach the patch here just for reference; will apply it, as soon as sphinx-rtd-theme-common gets installed on wolkenstein (working on a bugreport to DSA to get this done). Closing #1066967 against sphinx-common/dh_sphinxdoc now. Thanks python people for your help! > Actually, I would move ${sphinxdoc:Depends} from Recommends to Depends, > because the documentation is mostly unusable without the static files. Ok. I will leave this mostly to Debian Policy maintainers. Greetings Holger -- Holger Wansing PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076 diff --git a/parts/7doc b/parts/7doc index b079aea..5a358d7 100755 --- a/parts/7doc +++ b/parts/7doc @@ -260,22 +260,24 @@ if [ "$lang" = "en" ]; then install -p -m 664 `readlink -f $page` $destdir/Common_Content/images/$(basename $page) fi done fi } # mvhtml_sphinx() { -# Copy of mvhtml(), modified so it copies the _images and _static subfolders too -# This is needed by debian-policy since they moved to reStructuredText and Sphinx +# Copy of mvhtml(), modified so it copies the _images, _sources, _static, _static/css +# and _static/fonts subfolders too. +# This is needed by some manuals which moved to reStructuredText and Sphinx +# (like debian-policy and developers-reference) and use an html theme from read-the-docs. # This is probably uncomplete, since the _static folder contains symlinks to # some javascript that probably will not work. namedest=$1# destdir directory: maint-guide basedir=$2 # binary package data dir.: usr/share/doc/maint-guide-fr/html addlang=${3:-NO} # $lang in filename: NO | ADD | YES # NO: without $lang and leave it so # ADD: without $lang and add it (make link for en) (internal URL conversion) # YES: with$lang and leave it so (make link for en) lang=${4:-en} # language name: en (default), fr, ... @@ -317,20 +319,36 @@ for page in $pagepattern; do done if [ "$lang" = "en" ]; then pagepattern="$basedir/_static/*" for page in $pagepattern; do if [ -f "`readlink -f $page`" ]; then mkdirp $destdir/_static install -p -m 664 `readlink -f $page` $destdir/_static/$(basename $page) fi done + pagepattern="$basedir/_static/css/*" + for page in $pagepattern; do + if [ -d "$basedir/_static/css" ]; then + # Replace all existing relative symlinks in css by absolute symlinks to the correct place. + mkdirp $destdir/_static/css + ln -sf /usr/share/sphinx_rtd_theme/static/css/$(basename $page) $destdir/_static/css/$(basename $page) + fi + done + pagepattern="$basedir/_static/fonts/*" + for page in $pagepattern; do + if [ -d "$basedir/_static/fonts" ]; then + # Replace all existing relative symlinks in fonts by absolute symlinks to the correct place. + mkdirp $destdir/_static/fonts + ln -sf /usr/share/sphinx_rtd_theme/static/fonts/$(basename $page) $destdir/_static/fonts/$(basename $page) + fi + done pagepattern="$basedir/_images/*" for page in $pagepattern ; do if [ -f "`readlink -f $page`" ]; then mkdirp $destdir/_images install -p -m 664 `readlink -f $page` $destdir/_images/$(basename $page) fi done pagepattern="$basedir/_sources/*" for page in $pagepattern ; do if [ -f "`readlink -f $page`" ]; then
Bug#1064593: Bug#1066967: Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Hi, On Fri, Mar 22, 2024 at 03:30:55PM +0100, Holger Wansing wrote: > Ok, I see. > So, we will need to get sphinx-rtd-theme-common installed on all debian.org > website mirrors, and it will just work (?) ... From your earlier message it seemed to me like you are using the build tree in your deploy process, not the built package. That is why I suggested not running dh_sphinxdoc, however my suggestion applied only to your deploy procedure. The package which is being uploaded to Debian archive should still use dh_sphinxdoc. If you are using the built package and installing it on the remote server, then yes, install sphinx-rtd-theme-common and you should be good. Actually, I would move ${sphinxdoc:Depends} from Recommends to Depends, because the documentation is mostly unusable without the static files. -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#1064593: Bug#1066967: Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Hi, Dmitry Shachnev wrote (Fri, 22 Mar 2024 16:04:14 +0300): > On Fri, Mar 22, 2024 at 01:46:48PM +0100, Holger Wansing wrote: > > [...] > > Anyway, the symlink points to some path inside the package build path, here: > > /srv/debian-policy/debian-policy-4.6.2.1/debian/debian-policy/usr/share/sphinx_rtd_theme_static/css/theme.css > > > > and that path does not exist. > > Same in the debian-policy binary package. > > This is expected. The path in the build tree is relative in a way that when > a package is built and installed, it becomes working. Ok, I see. So, we will need to get sphinx-rtd-theme-common installed on all debian.org website mirrors, and it will just work (?) ... > The symlink is generated relative per Policy 10.5. And I think that even if > dh_sphinxdoc generated it as absolute, dh_link would later change it to > relative. > > If you are trying to rely on something that is in the build directory, you > have to turn relative symlinks into absolute ones on your own. Or just don't > call dh_sphinxdoc, then you will get normal files. ... or we switch away from dh_sphinxdoc. But there was already a hint, why this is a bad idea. Will need to be evaluated... Thanks for your time, guys! Holger -- Holger Wansing PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076
Bug#1064593: Bug#1066967: Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
On Fri, Mar 22, 2024 at 01:46:48PM +0100, Holger Wansing wrote: > [...] > Anyway, the symlink points to some path inside the package build path, here: > /srv/debian-policy/debian-policy-4.6.2.1/debian/debian-policy/usr/share/sphinx_rtd_theme_static/css/theme.css > > and that path does not exist. > Same in the debian-policy binary package. This is expected. The path in the build tree is relative in a way that when a package is built and installed, it becomes working. The symlink is generated relative per Policy 10.5. And I think that even if dh_sphinxdoc generated it as absolute, dh_link would later change it to relative. If you are trying to rely on something that is in the build directory, you have to turn relative symlinks into absolute ones on your own. Or just don't call dh_sphinxdoc, then you will get normal files. -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
On Fri, Mar 22, 2024 at 01:46:48PM +0100, Holger Wansing wrote: > Anyway, the symlink points to some path inside the package build path, here: > /srv/debian-policy/debian-policy-4.6.2.1/debian/debian-policy/usr/share/sphinx_rtd_theme_static/css/theme.css You are looking at relative symlinks not in their final locations, which isn't useful and also is expected for every relative symlink that is packaged. -- WBR, wRAR signature.asc Description: PGP signature
Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Hi, Andrey Rakhmatullin wrote (Fri, 22 Mar 2024 15:50:26 +0500): > On Fri, Mar 22, 2024 at 11:29:11AM +0100, Holger Wansing wrote: > > > I cannot reproduce this. I downloaded debian-policy source package and > > > built > > > it in an up-to-date sid chroot. And the built package has this: > > > > > > $ dpkg-deb -c debian-policy_4.6.2.1_all.deb | grep theme.css > > > lrwxrwxrwx root/root 0 2024-02-24 15:39 > > > ./usr/share/doc/debian-policy/policy.html/_static/css/theme.css -> > > > ../../../../../sphinx_rtd_theme/static/css/theme.css > > > > But above output shows a filesize of 0B. > > Shouldn't that be something different? > Not for symlinks. Ok. > > Has ./usr/share/doc/debian-policy/policy.html/_static/css/theme.css any > > useful content, when you open it? > It's a symlink, it can't have content. > It's target does have content, as shown in the quote below: > > > > So, it is a symlink, not an empty file. When resolving the relative path, > > > I get /usr/share/sphinx_rtd_theme/static/css/theme.css, and that file > > > exists in sphinx-rtd-theme-common and is non-empty. > > > if you open that theme.css file in the debian/debian-policy build path, > > does it have any content? > :-/ > > > Maybe it was bad wording, when I wrote > > "replaces files provided by read-the-doc theme by empty symlinks" in the > > subject of this bug. > > Probably "symlinks pointing to a not-existing file" is more correct? > To which non-existent files? Are they non-existent only when you don't > have sphinx-rtd-theme-common installed? Sure. > > I don't know where's the problem in detail, I only see that in the > > debian-policy binary package that file is empty, and therefore the html > > layout is broken. > It's not empty, it's a symlink that points to a non-existent (on your > system) file. > > > BTW: the same counts for all the symlinks under _static/fonts/: > > > > holgerw@t520:~/debian-policy$ ls -la > > policy/debian/debian-policy/usr/share/doc/debian-policy/policy.html/_static/fonts/ > > total 64 > > drwxr-xr-x 2 holgerw holgerw 4096 Mar 22 11:17 . > > drwxr-xr-x 5 holgerw holgerw 4096 Mar 22 11:17 .. > > lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.eot -> > > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot > > lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.svg -> > > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg > > lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.ttf -> > > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf > > lrwxrwxrwx 1 holgerw holgerw 69 Mar 22 11:17 fontawesome-webfont.woff -> > > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff > > lrwxrwxrwx 1 holgerw holgerw 70 Mar 22 11:17 fontawesome-webfont.woff2 -> > > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff2 > > lrwxrwxrwx 1 holgerw holgerw 64 Mar 22 11:17 Lato-BoldItalic.ttf -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-BoldItalic.ttf > > lrwxrwxrwx 1 holgerw holgerw 66 Mar 22 11:17 Lato-BoldItalic.woff2 -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-BoldItalic.woff2 > > lrwxrwxrwx 1 holgerw holgerw 58 Mar 22 11:17 Lato-Bold.ttf -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.ttf > > lrwxrwxrwx 1 holgerw holgerw 60 Mar 22 11:17 Lato-Bold.woff2 -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.woff2 > > lrwxrwxrwx 1 holgerw holgerw 60 Mar 22 11:17 Lato-Italic.ttf -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Italic.ttf > > lrwxrwxrwx 1 holgerw holgerw 62 Mar 22 11:17 Lato-Italic.woff2 -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Italic.woff2 > > lrwxrwxrwx 1 holgerw holgerw 61 Mar 22 11:17 Lato-Regular.ttf -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Regular.ttf > > lrwxrwxrwx 1 holgerw holgerw 63 Mar 22 11:17 Lato-Regular.woff2 -> > > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Regular.woff2 > > lrwxrwxrwx 1 holgerw holgerw 66 Mar 22 11:17 RobotoSlab-Bold.woff2 -> > > ../../../../../sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.woff2 > > lrwxrwxrwx 1 holgerw holgerw 69 Mar 22 11:17 RobotoSlab-Regular.woff2 -> > > ../../../../../sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.woff2 > > > > All those symlinks are pointing to a not-existing target here. > Only because you don't have sphinx-rtd-theme-common installed. That is indeed installed in the latest version here (sid): root@t520:/# dpkg -s sphinx-rtd-theme-common Package: sphinx-rtd-theme-common Status: install ok installed Priority: optional Section: python Installed-Size: 1173 Maintainer: Debian Python Team Architecture: all Multi-Arch: foreign Source: sphinx-rtd-theme Version: 2.0.0+dfsg-1 Depends: fonts-font-awesome, fonts-lato Description: sphinx theme from readthedocs.org (common files) This mobile-friendly sphinx theme was initially created for readthedocs.org,
Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
On Fri, Mar 22, 2024 at 11:29:11AM +0100, Holger Wansing wrote: > > I cannot reproduce this. I downloaded debian-policy source package and built > > it in an up-to-date sid chroot. And the built package has this: > > > > $ dpkg-deb -c debian-policy_4.6.2.1_all.deb | grep theme.css > > lrwxrwxrwx root/root 0 2024-02-24 15:39 > > ./usr/share/doc/debian-policy/policy.html/_static/css/theme.css -> > > ../../../../../sphinx_rtd_theme/static/css/theme.css > > But above output shows a filesize of 0B. > Shouldn't that be something different? Not for symlinks. > Has ./usr/share/doc/debian-policy/policy.html/_static/css/theme.css any > useful content, when you open it? It's a symlink, it can't have content. It's target does have content, as shown in the quote below: > > So, it is a symlink, not an empty file. When resolving the relative path, > > I get /usr/share/sphinx_rtd_theme/static/css/theme.css, and that file > > exists in sphinx-rtd-theme-common and is non-empty. > if you open that theme.css file in the debian/debian-policy build path, > does it have any content? :-/ > Maybe it was bad wording, when I wrote > "replaces files provided by read-the-doc theme by empty symlinks" in the > subject of this bug. > Probably "symlinks pointing to a not-existing file" is more correct? To which non-existent files? Are they non-existent only when you don't have sphinx-rtd-theme-common installed? > I don't know where's the problem in detail, I only see that in the > debian-policy binary package that file is empty, and therefore the html > layout is broken. It's not empty, it's a symlink that points to a non-existent (on your system) file. > BTW: the same counts for all the symlinks under _static/fonts/: > > holgerw@t520:~/debian-policy$ ls -la > policy/debian/debian-policy/usr/share/doc/debian-policy/policy.html/_static/fonts/ > total 64 > drwxr-xr-x 2 holgerw holgerw 4096 Mar 22 11:17 . > drwxr-xr-x 5 holgerw holgerw 4096 Mar 22 11:17 .. > lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.eot -> > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot > lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.svg -> > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg > lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.ttf -> > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf > lrwxrwxrwx 1 holgerw holgerw 69 Mar 22 11:17 fontawesome-webfont.woff -> > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff > lrwxrwxrwx 1 holgerw holgerw 70 Mar 22 11:17 fontawesome-webfont.woff2 -> > ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff2 > lrwxrwxrwx 1 holgerw holgerw 64 Mar 22 11:17 Lato-BoldItalic.ttf -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-BoldItalic.ttf > lrwxrwxrwx 1 holgerw holgerw 66 Mar 22 11:17 Lato-BoldItalic.woff2 -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-BoldItalic.woff2 > lrwxrwxrwx 1 holgerw holgerw 58 Mar 22 11:17 Lato-Bold.ttf -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.ttf > lrwxrwxrwx 1 holgerw holgerw 60 Mar 22 11:17 Lato-Bold.woff2 -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.woff2 > lrwxrwxrwx 1 holgerw holgerw 60 Mar 22 11:17 Lato-Italic.ttf -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Italic.ttf > lrwxrwxrwx 1 holgerw holgerw 62 Mar 22 11:17 Lato-Italic.woff2 -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Italic.woff2 > lrwxrwxrwx 1 holgerw holgerw 61 Mar 22 11:17 Lato-Regular.ttf -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Regular.ttf > lrwxrwxrwx 1 holgerw holgerw 63 Mar 22 11:17 Lato-Regular.woff2 -> > ../../../../../sphinx_rtd_theme/static/fonts/Lato-Regular.woff2 > lrwxrwxrwx 1 holgerw holgerw 66 Mar 22 11:17 RobotoSlab-Bold.woff2 -> > ../../../../../sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.woff2 > lrwxrwxrwx 1 holgerw holgerw 69 Mar 22 11:17 RobotoSlab-Regular.woff2 -> > ../../../../../sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.woff2 > > All those symlinks are pointing to a not-existing target here. Only because you don't have sphinx-rtd-theme-common installed. -- WBR, wRAR signature.asc Description: PGP signature
Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Hi Dmitry, Dmitry Shachnev wrote (Fri, 22 Mar 2024 00:35:57 +0300): > I cannot reproduce this. I downloaded debian-policy source package and built > it in an up-to-date sid chroot. And the built package has this: > > $ dpkg-deb -c debian-policy_4.6.2.1_all.deb | grep theme.css > lrwxrwxrwx root/root 0 2024-02-24 15:39 > ./usr/share/doc/debian-policy/policy.html/_static/css/theme.css -> > ../../../../../sphinx_rtd_theme/static/css/theme.css But above output shows a filesize of 0B. Shouldn't that be something different? Has ./usr/share/doc/debian-policy/policy.html/_static/css/theme.css any useful content, when you open it? > So, it is a symlink, not an empty file. When resolving the relative path, > I get /usr/share/sphinx_rtd_theme/static/css/theme.css, and that file > exists in sphinx-rtd-theme-common and is non-empty. As above: if you open that theme.css file in the debian/debian-policy build path, does it have any content? If I open it here, nano shows "New file" in the status bar at the bottom, so the file does not exist. Maybe it was bad wording, when I wrote "replaces files provided by read-the-doc theme by empty symlinks" in the subject of this bug. Probably "symlinks pointing to a not-existing file" is more correct? > The only issue I see is that sphinx-rtd-theme-common is in Recommends of > debian-policy, not in Depends. But that is because ${sphinxdoc:Depends} > was put there. > > Am I doing something wrong? I don't know where's the problem in detail, I only see that in the debian-policy binary package that file is empty, and therefore the html layout is broken. BTW: the same counts for all the symlinks under _static/fonts/: holgerw@t520:~/debian-policy$ ls -la policy/debian/debian-policy/usr/share/doc/debian-policy/policy.html/_static/fonts/ total 64 drwxr-xr-x 2 holgerw holgerw 4096 Mar 22 11:17 . drwxr-xr-x 5 holgerw holgerw 4096 Mar 22 11:17 .. lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.eot -> ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.svg -> ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg lrwxrwxrwx 1 holgerw holgerw 68 Mar 22 11:17 fontawesome-webfont.ttf -> ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf lrwxrwxrwx 1 holgerw holgerw 69 Mar 22 11:17 fontawesome-webfont.woff -> ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff lrwxrwxrwx 1 holgerw holgerw 70 Mar 22 11:17 fontawesome-webfont.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff2 lrwxrwxrwx 1 holgerw holgerw 64 Mar 22 11:17 Lato-BoldItalic.ttf -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-BoldItalic.ttf lrwxrwxrwx 1 holgerw holgerw 66 Mar 22 11:17 Lato-BoldItalic.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-BoldItalic.woff2 lrwxrwxrwx 1 holgerw holgerw 58 Mar 22 11:17 Lato-Bold.ttf -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.ttf lrwxrwxrwx 1 holgerw holgerw 60 Mar 22 11:17 Lato-Bold.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.woff2 lrwxrwxrwx 1 holgerw holgerw 60 Mar 22 11:17 Lato-Italic.ttf -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Italic.ttf lrwxrwxrwx 1 holgerw holgerw 62 Mar 22 11:17 Lato-Italic.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Italic.woff2 lrwxrwxrwx 1 holgerw holgerw 61 Mar 22 11:17 Lato-Regular.ttf -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Regular.ttf lrwxrwxrwx 1 holgerw holgerw 63 Mar 22 11:17 Lato-Regular.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Regular.woff2 lrwxrwxrwx 1 holgerw holgerw 66 Mar 22 11:17 RobotoSlab-Bold.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/RobotoSlab-Bold.woff2 lrwxrwxrwx 1 holgerw holgerw 69 Mar 22 11:17 RobotoSlab-Regular.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/RobotoSlab-Regular.woff2 All those symlinks are pointing to a not-existing target here. Holger -- Holger Wansing PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076
Bug#1064593: Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Control: tags 1066967 +unreproducible Hi Holger! On Sat, Mar 16, 2024 at 09:52:54AM +0100, Holger Wansing wrote: > Package: sphinx-common > Severity: serious > > Hi, > > dh_sphinxdoc does not work well with read-the-doc theme, apparently. > Debian policy document has switched to sphinx_rtd_theme recently (see > https://salsa.debian.org/dbnpolicy/policy/-/commit/686622814018b5a121252b189d99c1968f332b78 > ) > > However, the built document has a completely broken html layout, because > many files under _static/ are empty (0B size), most noteably > _static/css/theme.css. > > If I replace > dh $@ --with sphinxdoc > by > dh $@ > (so do not use dh_sphinxdoc), I get a valid html file with the theme > in use. I cannot reproduce this. I downloaded debian-policy source package and built it in an up-to-date sid chroot. And the built package has this: $ dpkg-deb -c debian-policy_4.6.2.1_all.deb | grep theme.css lrwxrwxrwx root/root 0 2024-02-24 15:39 ./usr/share/doc/debian-policy/policy.html/_static/css/theme.css -> ../../../../../sphinx_rtd_theme/static/css/theme.css So, it is a symlink, not an empty file. When resolving the relative path, I get /usr/share/sphinx_rtd_theme/static/css/theme.css, and that file exists in sphinx-rtd-theme-common and is non-empty. The only issue I see is that sphinx-rtd-theme-common is in Recommends of debian-policy, not in Depends. But that is because ${sphinxdoc:Depends} was put there. Am I doing something wrong? -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#1066967: dh_sphinxdoc: replaces files provided by read-the-doc theme by empty symlinks
Package: sphinx-common Severity: serious Hi, dh_sphinxdoc does not work well with read-the-doc theme, apparently. Debian policy document has switched to sphinx_rtd_theme recently (see https://salsa.debian.org/dbnpolicy/policy/-/commit/686622814018b5a121252b189d99c1968f332b78 ) However, the built document has a completely broken html layout, because many files under _static/ are empty (0B size), most noteably _static/css/theme.css. If I replace dh $@ --with sphinxdoc by dh $@ (so do not use dh_sphinxdoc), I get a valid html file with the theme in use. More details on that topic can be found in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064593 To get an idea of how it looks like, see https://www.debian.org/doc/debian-policy/ (however, there is also an issue with rtd theme on debian.org, that's why _static/css/ is completely missing there. That's an known issue, but we need a valid document in the debian-policy binary package first, to get the website problem fixed.) So long Holger -- Holger Wansing PGP-Finterprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076