FS#71136 - [groff] Unnecessary workaround from 2008 still remains: (aq
Attached to Project:
Arch Linux
Opened by Felipe Contreras (felipec) - Saturday, 05 June 2021, 18:19 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 08 March 2023, 05:43 GMT
Opened by Felipe Contreras (felipec) - Saturday, 05 June 2021, 18:19 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 08 March 2023, 05:43 GMT
|
Details
In task
The issue was a bug in docbook, which debian decided to fix in another way: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507673#65 Ultimately, no workaround is needed any more, but yet /usr/share/groff/site-tmac/man.local still has the workaround: . char \' \N'39' That should be removed. For more details and the full history check my blog post: https://felipec.wordpress.com/2021/06/05/adventures-with-man-color/ |
This task depends upon
. if '\*[.T]'utf8' \{\
. char \- \N'45'
. char - \N'45'
. char ' \N'39'
. char \' \N'39'
. \}
It's not necessary anymore.
If you open the man page of PKGBUILD which was the issue in
FS#9643, /usr/share/man/man5/PKGBUILD.5.gz, you see this:license=(\*(AqGPL\*(Aq))
Which is correct, and also the portability helper on top:
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
This is what it's supposed to generate, as they fixed it in 2010:
https://github.com/docbook/xslt10-stylesheets/commit/fb553434265906ed81edc6d5f533d0b08d200046
I think the whole section isn't needed, but the hack that was added in 2008 was just the last one: char \' \N'39'.
It would be good to explore the rest of the file:
# TODO: everyone is doing this - find out why upstream does not...
I believe the whole section isn't necessary, I could do some investigation if you like, maybe in a different ticket.
As for GROFF_SGR, the reason it's there is that if you want some colors in man pages:
MANPAGER="less -R --use-color -Dd+r -Du+b" man git
sgr will mess that up, but it can be disabled by passing -c to groff, or MANROFFOPT="-c".
Upstream has GROFF_NO_SGR to disable sgr, instead of the custom GROFF_SGR to enable it.