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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

In task  FS#9643  a hack as added to convert \(aq to ', which is something the developers of groff decidedly don't want.

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

Closed by  Tobias Powalowski (tpowa)
Wednesday, 08 March 2023, 05:43 GMT
Reason for closing:  Fixed
Comment by Felipe Contreras (felipec) - Monday, 27 February 2023, 16:51 GMT
Hello?
Comment by Felipe Contreras (felipec) - Monday, 06 March 2023, 16:52 GMT
I noticed you removed the entire man.local file, while that might be desirable at some point, this issue is about this section:

. if '\*[.T]'utf8' \{\
. char \- \N'45'
. char - \N'45'
. char ' \N'39'
. char \' \N'39'
. \}

It's not necessary anymore.
Comment by Tobias Powalowski (tpowa) - Monday, 06 March 2023, 16:57 GMT
Is this whole section not needed anymore?
Comment by Felipe Contreras (felipec) - Monday, 06 March 2023, 17:16 GMT
No, the issue was caused by a problem in docbook that was fixed in 2010.

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'.
Comment by Tobias Powalowski (tpowa) - Monday, 06 March 2023, 17:27 GMT
Yes this one is now removed in -9.
Comment by Felipe Contreras (felipec) - Monday, 06 March 2023, 17:56 GMT
Correct, that -9 fixes this.

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.
Comment by Tobias Powalowski (tpowa) - Monday, 06 March 2023, 18:46 GMT
Yes wouöd be good to take this to a new report. I'm glad if you can do some research on it. Thank you.

Loading...