• Bug#1064593: dh_sphinxdoc: replaces files provided by read-the-doc them

    From Holger Wansing@21:1/5 to Sean Whitton on Sat Apr 6 09:51:00 2024
    XPost: linux.debian.bugs.dist

    This is a multi-part message in MIME format.

    Hi,

    Sean Whitton <spwhitton@spwhitton.name> wrote (Thu, 28 Mar 2024 09:48:51 +0800):
    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.

    DSA (adsb) did install the python3-sphinx-rtd-theme package on the www static mirrors (thanks Adam for the quick reaction !!!), and I pushed my changings
    to the 7doc script, but reality has proven me wrong, sadly:

    The idea was, to have absolute symlinks from inside the manuals directories
    to /usr/share/sphinx_rtd_theme/static/... and all looks fine on wolkenstein, but those symlinks fail to get synced to the www static mirrors, because of rsync's "--safe-links" option:

    --safe-links ignore symlinks that point outside the tree

    Thus, the debian-policy is still broken on our website, as before.


    I now tend to switch to another approach (also proposed similarly by Adam):

    instead of relying on the rtd-theme package in the default install path of the package installed by DSA, I will use the infrastructure in 1ftpfiles and
    7doc of webmaster's cron repo, to (always) fetch the latest version of that package (and two more packages, which the former depends on: fonts-font-awesome and fonts-lato, to get the needed fonts) and unpack+copy them into
    a dedicated path inside the www build tree.

    That path will be synced to the static www mirrors, and we can symlink
    to it from the manuals.
    (And the content of that path will automatically be kept up-to-date on
    the unstable version of packages, so we don't get outdated/orphaned
    copies of that packages in the isolated path.)
    I want the unstable version of that packages here, since they need to incorporate with the unstable version of the different manuals (like debian-policy), and those packages are built by buildd, so unstable.

    How does that sound in the light of Debian guidelines and best practice?

    Is it ok, to have such "isolated copies" of packages as described above?

    I have not much experience in similar things, so I would like to get
    some comments here, please.

    Or do people prefer a complete different way, like using another theme
    or whatever? (since this thing is getting bigger and bigger currently)

    (Please keep in mind that this is not only for debian-policy, but in the
    long term all sphinx-based manuals are supposed to follow the path
    discussed here.)

    I already proposed to switch away from dh_sphinxdoc, to completely get rid
    of this symlink issue, but someone mentioned various privacy issues as a
    contra argument...



    Patch attached for the first part (to get above mentioned packages
    in the www build path) - just posted for reference here.
    (Second part - to point the debian-policy manual to that path - will
    follow in another round.)


    Holger



    --
    Holger Wansing <hwansing@mailbox.org>
    PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076

    diff --git a/parts/1ftpfiles b/parts/1ftpfiles
    index 3a2d953..3079131 100755
    --- a/parts/1ftpfiles
    +++ b/parts/1ftpfiles
    @@ -72,6 +72,11 @@ $WGET -O - $httpurlamd64 | xzcat >Packages-amd64

    httpurlrepo="http://${ftpsite}/debian"

    +# readthedocs.org html theme files and related fonts
    +getdeb all sphinx-rtd-theme-common
    +getdeb all fonts-font-awesome
    +getdeb all fonts-lato
    +
    # many language specific binary packages (arch=all)
    getdebs aptitude
    getdebs debian-faq
    diff --git a/parts/7doc b/parts/7doc
    index 6998512..47e076e 100755
    --- a/parts/7doc
    +++ b/parts/7doc
    @@ -428,6 +428,45 @@ echo -n "Installing documents:" >> $webdocdir/build.log
    # We only have sid now
    dist=sid

    +# readthedocs.org html theme files and related fonts.
    +# We need those files inside the www.d.o build tree on wolkenstein, because
    +# the manuals will have symlinks pointing to those files, and syncing such
    +# symlinks to the static www mirrors fails, when they point outside of the
    +# tree (because of rsync's "--safe-links" option).
    +# Therefore, we cannot simply have the packages installe