Bug#1067155: debian-policy: prerm scripts cannot actually rely on dependencies
Hello, On Tue 19 Mar 2024 at 01:02pm +01, Julian Andres Klode wrote: > Package: debian-policy > Severity: wishlist > X-Debbugs-Cc: de...@lists.debian.org, debian-d...@lists.debian.org > > APT's installation planner does not consider dependencies of packages > being scheduled for removal, so a prerm must fail equally gracefully > as a postrm does in absence of its dependencies. > > This does break dpkg's assumptions which it happily tells you about, > but this is the reality we live in. > > So e.g. one thing you see is that apt removes libapt-pkg6.0, then > unpacks libapt-pkg6.0t64, then removes libapt-pkg6.0 reverse > dependencies. > > Clearly APT should be considering dependencies when removing packages > but even in that case, removals may sometimes need to be forced in the > wrong order because any order leads to broken dependencies, so still, > prerms should not rely on dependencies, but only on essential packages. I'm not sure that Policy is the place to discuss a change proposal like this, and we can't render a swathe of packages RC buggy by making such a change here. The archive would need to change first. -- Sean Whitton signature.asc Description: PGP signature
Bug#1067079: Clarify that policy on a technology does not implicitly mandate that technology
Hello, On Mon 18 Mar 2024 at 04:06am -07, Josh Triplett wrote: > On Mon, Mar 18, 2024 at 05:38:15PM +0800, Sean Whitton wrote: >> Was there some recent packaging situation that prompted you to think >> about this? I'm cautious about adding it in the absence of that. > > Mostly, recent discussions in various places regarding whether packages > are required to use *cron* to run periodic jobs. Policy says what > packages must do if they install a cronjob, but that itself does not > mandate the use of cron specifically. It seemed worth explicitly stating > the understood-but-unwritten interpretation that having Policy about XYZ > does not mandate that packages use XYZ. > > I've also seen a few arguments over the decades that amount to "Policy > talks about A, and doesn't talk about B" being used as some amount of > weight towards A or against B. > > And finally, I have occasionally seen someone try to build a Debian > package by sitting down with the Policy manual, and start down the route > of trying to supply everything Policy talks about that seems like it > makes sense for the package. The mention of "Policy talking about where > to install info documentation, but that doesn't mean you have to have > info documentation" was not a hypothetical; I've seen that and similar > reasoning a non-zero number of times. > > I figured that something like this text would help address all of those. Thanks. For the time being, I myself am not convinced. Policy is not a stick to beat maintainers with, as we say, but I'm not sure that idea is one that ought to be in Policy itself. -- 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, 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