aports/community/plan9port/no-html-man-pages.patch
Sören Tempel bfef69f152 community/plan9port: don't provide man pages in HTML format
These man pages have been broken since this package is available in
Alpine due to the bug described in the patch file description. Nobody
complained to me about broken HTML pages, hence I assume we can safely
remove them as most people will use `9 man …` to view plan9port man
pages anyhow.

This also causes the coredump usr/lib/plan9/man/core to be removed
from the package.
2022-04-16 11:53:35 +02:00

39 lines
1.4 KiB
Diff

Don't build HTML pages for provided man pages. Instead, require users
to view them via `9 man`. For other software we also don't ship HTML
files for man pages.
Furthermore, there is a bug in plan9port where it would crash due to
a sprintf(3) buffer overflow detected by fortify-headers in the
following troff code:
https://github.com/9fans/plan9port/blob/74374cc8a40c450423785015c2e30d5a2ed2920c/src/cmd/troff/n1.c#L247-L249
This code uses a fixed-size buffer and copies various data to this
buffer without a bounds check. This includes the path to the build
directory (DWBhomedir). On the builders this path itself is almost
100 bytes in size and hence causes a buffer overflow which then
causes fortify-headers to terminate troff execution with a SIGILL.
This causes all HTML pages, generated on the builders, to be broken.
Locally, this can't be reprouced since DWBhomedir will point to $PLAN9.
Also, this doesn't cause a build failure since the HTML pages are
generated by piping `troff -manhtml` into `troff2html` and this code is
executed without pipefail.
diff -upr a/INSTALL b/INSTALL
--- a/INSTALL 2021-10-19 18:08:45.000000000 +0200
+++ b/INSTALL 2022-04-16 12:56:44.710784569 +0200
@@ -175,12 +175,6 @@ if $doinstall; then
echo "* Renaming hard-coded /usr/local/plan9 paths..."
cd $PLAN9
sh lib/moveplan9.sh
- echo "* Building web manual..."
- (
- cd $PLAN9/dist
- echo cd `pwd`';' mk man
- mk man
- )
fi
if [ -x LOCAL.INSTALL ]; then